-
Notifications
You must be signed in to change notification settings - Fork 38.7k
Description
M. Justin opened SPR-10707 and commented
I would like to be able to use RestTemplate with a nonstandard HTTP method that's not found in the list of 8 provided in the HttpMethod enum. Specifically, I would like to do a "PURGE" request against a Varnish cache. Such an enhancement would also allow calling other APIs with nonstandard HTTP methods, such as the various WebDAV methods.
Looking at the spring-web source code, it looks like there is currently no way of working around this while still using the library, since the HttpMethod is used exclusively throughout the code except where converted to a name to interface with the underlying HTTP library (e.g. SimpleClientHttpRequestFactory).
I would like to see a version of the exchange/execute API that takes in either an arbitrary status String, or have an interface that HttpStatus implements that could be provided in cases like this. For a concrete example of what I'm referring to (but applied to status codes rather than HTTP methods), see Status and StatusType in JAX-RS.
3 votes, 7 watchers