Should the representation(html, xml, json) returned by a RESTful web service be determined by the url or by the Accept HTTP header?
相关问题
- 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
Since very many RESTful URLs do not have an extension, you should/must base on Content-Type
edit: I don't mean this to sound as harsh as it does, more that you're going to have to pay attention to content-type and won't always be able to refer to extension