I am specifically interested in whether a proxy server(or other http caches) caches the URI, Method, Headers and Body of the client's request? Or is it only URI and Method?
The reason is I am confused with negative caching, e.g. caching response with 400 status code ("Bad request"). I mean if the first response had an "invalid" body that caused the 400 error and we cache it does it mean that subsequent requests with a "valid" body will still get 400 response from the cache? (Without even hitting the Origin server?
The GET requests are the ones that can be cached by intermediary caches. As shown in the book "HTTP: The definitive guide" only URL and headers get cached.
The PUT, POST and DELETE requests will cause the cache to be invalidated as shown here.
So my original question (about 400 response because of invalid body) was wrong since GET request should not have body according to REST and other methods (which could have body) cause the cache to be invalidated.
Thanks @Adrien for pointing at it!