Read about rest api versioning best practices, The latest news, videos, and discussion topics about rest api versioning best practices from alibabacloud.com
Introduction to best practices and best practices of REST interfaces for Spring Boot Development
This article introduces the best practices for developing REST interfaces in Spring Boot and shares them with you as follows:
HTTP verb corresponds to SQL command
GET
Obtain reso
, using Application/json is actually wrong. The vendor-specific media type should be used, for example:Application/vnd.mycompany.country.display+json and Application/vnd.mycompany.country.create+json. It can be done more finely and flexibly depending on the situation. This way, the API consumer knows how much of the requested content should be sent for different actions.VersionOur API has changed many times
avoid malicious attacks. However, to what extent the number and frequency should be controlled depends on the importance of your API and the load capacity. Each system will have its own judgment, as long as you have mastered this scale, there should be no problem.
In addition, due to browser restrictions, only http get and post methods can be used. If you directly call the rest service through Ajax, when
Best practices for open api application development and best practices for api application development
In the company's internal system, there will be some third-party Data Access scenarios, for example, in Ctrip's app, you can see iron's ticket, you can find the hotel where to go in the Meituan hotel list. This data i
REST itself is a design style rather than a standard. REST talks about a very important thing, how to use Web standards correctly, such as HTTP and URIs. The best way to learn about REST is to think about and understand the Web and how it works . If you design an application that conforms to the rest principles, these
Management REST APIThe way to invoke the API is to use HttpWebRequest to send HTTP requestsWe can refer to the following sample documentation to make the call.Http://msdn.microsoft.com/zh-cn/library/azure/hh264518.aspxThis example document lists the information needed to create a cloud storage account.Below the request in this document we can get the URL of the sending request, as well as the method of the
. Most of the time the client just needs some of the information, but the interface still transmits all the information, this situation increases the network transmission, especially for mobile applications are particularly unfriendly, but also require the client to extract the required data. Instead of building two APIs that are roughly the same as the return field, it increases the complexity of the backend implementation, either by adding business logic or by increasing the difficulty of main
/response headers, caching, versioning, Variou s content formats)
It also supports the MVC features such as routing, Controllers, action results, filter, model binders, IOC container or de pendency injection, unit testing that makes it more simple and robust.
It can be hosted with the application or on IIS.
It's light weight architecture and good for devices which has limited bandwidth like smart phones.
Responses is formatted by Web
RESTful design Method 1. Domain nameThe API should be deployed under a dedicated domain name whenever possible.https://api.example.comIf you determine that the API is simple, there is no further extension, consider placing it under the primary domain name.https://example.org/api/2. Version (Versioning)The version numbe
with the applicaion or on IIS or using a window service.
WCF Rest
To use WCF as WCF Rest service, you have the to enable webhttpbindings.
It support HTTP GET and POST verbs by [webget] and [WebInvoke] attributes respectively.
To enable the other HTTP verbs. Some configuration in IIS to accept request of this particular verb on. svc file S
Passing data through parameters using a We
with the applicaion or on IIS or using a window service.
WCF Rest
To use WCF as WCF Rest service, you have the to enable webhttpbindings.
It support HTTP GET and POST verbs by [webget] and [WebInvoke] attributes respectively.
To enable the other HTTP verbs. Some configuration in IIS to accept request of this particular verb on. svc file S
Passing data through parameters using a We
with the applicaion or on IIS or using a window service.
WCF Rest
To use WCF as WCF Rest service, you have the to enable webhttpbindings.
It support HTTP GET and POST verbs by [webget] and [WebInvoke] attributes respectively.
To enable the other HTTP verbs. Some configuration in IIS to accept request of this particular verb on. svc file S
Passing data through parameters using a We
be hosted with in the applicaion or on IIS or using window service.
WCF Rest
To use WCF as WCF Rest service you have to enable webHttpBindings.
It support http get and POST verbs by [WebGet] and [WebInvoke] attributes respectively.
To enable other HTTP verbs you have to do some configuration in IIS to accept request of that FIG on. svc files
Passing data through parameters using a WebGet needs configu
with the applicaion or on IIS or using a window service.
WCF Rest
To use WCF as WCF Rest service, you have the to enable webhttpbindings.
It support HTTP GET and POST verbs by [webget] and [WebInvoke] attributes respectively.
To enable the other HTTP verbs. Some configuration in IIS to accept request of this particular verb on. svc file S
Passing data through parameters using a We
The the new framework for building HTTP services with easy and simple.
Web API is open source a ideal platform for building rest-ful services over the. NET Framework.
Unlike WCF Rest service, it use the full featues of HTTP (like URIs, Request/response headers, caching, versioning, Variou s content formats)
data through parameters using a webget need configuration. The UriTemplate must be specified.
Supports XML, JSON, and atom data formats.
Web API
The the new framework for building HTTP services with easy and simple.
Web API is open source a ideal platform for building rest-ful services over the. NET Framework.
Unlike WCF
request in IIS.
The UriTemplate template must be specified when the parameter is passed in WebGet mode.
Web API:
is a lightweight framework for building HTTP services, which is in the. NET platform, the ideal framework for building restful Web service.
Compared to the WCF Rest service, the Web API provides all the features of HTTP, such as
.
5. Supports XML, JSON, and other data formats.
WEB API
1. A new framework provided by Microsoft to create HTTP services more easily and easily.
2. Open-source projects are an ideal platform for building a REST-ful service on the. NET platform.
3. Compared with WCF Rest, Web APIs support all HTTP features (like URIs, request/response headers, caching,
formats.WEB API1. Microsoft provides a new framework for creating HTTP services more easily and conveniently.2. Open source project, is in. NET platform to build rest-ful services.3. Compared to WCF rest, the Web API supports all HTTP features (like URIs, Request/response headers, caching, versioning, various content
the new framework for building HTTP services with easy and simple way.
Web API is open source an ideal platform for building REST-ful services over the. NET Framework.
Unlike WCF Rest service, it use the full featues of HTTP (like URIs, request/response headers, caching, versioning, various content formats)
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.