Overview
| Artifact ID: | a343f965712933c788b3786427328bfaa887d8f7e27f2e12fbc0e88f9b89f198 |
|---|---|
| Ticket: | 15e4bd83c28d0a817bf30e06071c90fe1e6db534
http::geturl: Documentation discrepancy on -query {} |
| User & Date: | kjnash on 2022-05-10 19:29:25 |
Changes
- icomment:
Hi Harald, I've just looked at RFC 7230-3 and I cannot see anything that forbids a POST request with no message body. However, it is an unusual case: do you use custom request headers to modify the state of the server? The behaviour of http::geturl could be changed, but this is a change of API that might break some existing code, and would require an increase in the major version of the http package. Fortunately, you can use the existing http::geturl to send POST with an empty body by using the options "-method POST -headers {Content-Length 0}". <verbatim> -method type Force the HTTP request method to type. ::http::geturl will auto-select GET, POST or HEAD based on other options, but this option enables choices like PUT and DELETE for webdav support. </verbatim> I will modify the man page http(n) to state that the value for -query must be non-empty to cause the POST method. Best wishes, Keith. - login: "kjnash"
- mimetype: "text/x-fossil-wiki"