I am trying to build a REST service and I have a few questions.
Location
header is body required? If-modified-since
: Can this header value be null
or not set to indicate whatever latest version in PUT
and DELETE
calls? Location
header does not require body content. In fact, if the status code of the response is 302 Found
or a similar redirect, body content would make no sense. If-modified-since
is part of the HTTP concept 'Conditional GET'. If it is not set and if not other header that is part of this concept ( If-Match
, If-None-Match
, If-Unmodified-Since
) is set, the server is supposed to return a representation of the current resource. In fact, Conditional GET is not a concept about versions but about caching. If the client already knows a representation of the resource that is still up-to-date, it would be redundand for the server to return the same representation again.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.