I am designing REST endpoints for my application and i need to use PATCH for a few of the endpoints. Will all browsers that support HTTP/1.1 be able to support the PATCH ?
相关问题
- Design RESTful service with multiple ids
- Axios OPTIONS instead of POST Request. Express Res
- Plain (non-HTML) error pages in REST api
- Laravel 5.1 MethodNotAllowedHttpException on store
- Can I parameterize labels and properties on CREATE
相关文章
- Got ActiveRecord::AssociationTypeMismatch on model
- Multiple parameters in AngularJS $resource GET
- Global Exception Handling in Jersey & Spring?
- REST search interface and the idempotency of GET
- Getting error detail from WCF REST
- Send a GET request with a body in JavaScript (XMLH
- GuzzleHttp Hangs When Using Localhost
- JAX-RS (Jersey) ExceptionMapper - @Context injecti
HTTP/1.1 did not define the
PATCH
method.HTTP/1.1 does leave itself open for clients and/or servers to add new methods.
RFC 5789 defined the conventions for using the
PATCH
method.The method defined within a HTTP request is nothing more than a string. Browsers should allow JavaScript to use whatever HTTP method it wants in the
XmlHttpRequest
; see this Q&A for more info. In short, any modern browser will allow you to do this, i.e. IE9+ and Firefox/Chrome/Safari/Opera/Spartan from the last few years.Also, don't forget the server needs to specifically handle the
PATCH
method too, it doesn't just magically happen.