Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

POST requests can be cached? #50

Open
ghost opened this issue Jun 11, 2017 · 1 comment
Open

POST requests can be cached? #50

ghost opened this issue Jun 11, 2017 · 1 comment

Comments

@ghost
Copy link

ghost commented Jun 11, 2017

Re: https://rubenverborgh.github.io/WebFundamentals/web-apis/#soap-generation

Surprisingly, it seems that using POST does not necessarily imply non-cacheability.

From the spec:

Responses to this method are not cacheable, unless the response includes appropriate Cache-Control or Expires header fields.

What do you make of this?

@RubenVerborgh
Copy link
Owner

It's not just POST, but the way it is used: SOAP endpoints are exposed through a single URL, and the equivalent of resource identification happens through request bodies. In other words, whether the client requests “book 35“ or “song 47”, the requests will not differ in URL but only in request body. And HTTP caching happens by request URL and headers.

So the only way a SOAP response can be cached correctly using HTTP is in the pathological case where the endpoint offers a single response for all of its operations (including errors). In other words: not gonna happen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant