Why SOAP can't use HTTP caching mechanisms

前端 未结 3 1884
忘了有多久
忘了有多久 2021-01-02 09:34

I am making a transition from SOAP to REST, and I would like to convince my colleagues that this is a good move. We don\'t need the extra security mechanisms that SOAP can p

3条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-02 09:58

    Stating that POST requests are non-idempotent in general is not correct. POST should be used for non-idempotent operations but SOAP is not really using the HTTP correctly and as the result of that it can happened, that POST is used for idempotent operation - for example for fetching an entity by ID (which you would normally use GET for).

    Also according to this: Is it possible to cache POST methods in HTTP? (check the answer of reBoot), POST requests is possible to cache according to RFC. It may not be implemented very well by browsers and proxies though. Anyway if you add appropriate HTTP headers, SOAP over HTTP messages should be possible to cache using HTTP caching mechanisms.

提交回复
热议问题