ASP. NET Web API features

Source: Internet
Author: User

ASP. NET MVC 4 contains the ASP. NET Web API, a new framework for creating HTTP services that can connect multiple clients, including browsers, mobile devices and more, and the ASP. NET Web API is also the ideal platform for building RESTful services.

The ASP. NET Web API contains the following features:
    • Advanced HTTP programming Model: Use the new strongly typed HTTP object model to manipulate HTTP requests and responses directly, using the same programming model and HTTP pipelines on HTTP clients;
    • Support Routing: The Web API fully supports ASP. NET routing, including routing parameters and Constraints. In addition, to the Mapping Support Convention of the action, it is no longer necessary to add properties like [HttpPost] to the class or method;
    • Content Negotiation: the client and the server can together determine the format of the API return data. By default, XML, JSON, and form url-encoded formats can be extended to add custom formats, and can even replace the default content negotiation policy;
    • model Binding and validation: model Binders can easily extract data from an HTTP request and convert it to use in an action method. NET Object
    • Filter: The Web API supports filtering, including the well-known [authorize] filtering tag, which allows you to add and insert custom filters for the Action, enabling authentication, exception handling, etc.
    • Query aggregation: as long as you simply return iqueryable<t>, the Web API will support querying through OData address conventions;
    • Improved HTTP detail testability: Instead of setting the HTTP details to a static Context object, the Web API uses Httprequestmessage and Httpresponsemessage instances to add custom types to these HTTP types using the generic versions of these objects ;
    • improved dependency inversion (IoC) Support: The Web API uses the MVC Dependency Resolver implementation of the service locator pattern to get instances in different scenarios;
    • code-based configuration: The Web API is configured separately using code to ensure the cleanliness of the configuration files;
    • Self-hosting (self-host): The Web API, in addition to being hosted in IIS, can be hosted in a process and can still use routing and other features.

ASP. NET Web API features

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.