Support for HTTP PATCH
lenkite opened this issue · 3 comments
clj-http-lite has no support for HTTP PATCH. Support for this can be introduced via the
X-HTTP-Method-Override
header, whose value can be specified as PATCH while the actual verb is POST. This can work around the JDK UrlConnection limitation.
Interesting. Can you provide some links elaborating on this approach and perhaps also explain if there are any limitations?
Would be very open to merge this if it works 👍
Here are some links. This was originally a vendor extension which got "adopted" all over.
https://stackoverflow.com/questions/25163131/httpurlconnection-invalid-http-method-patch
https://www.oreilly.com/library/view/restful-java-web/9781784399092/ch08s17.html
https://www.infoworld.com/article/3249687/how-to-implement-a-delegatinghandler-for-x-http-method-override-in-web-api.html
I guess people can use this header themselves if they want to work around the issue. This way we don't have to support it whenever this doesn't work in some cases.