You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When curl follows a redirect and if the request is a POST, it sends the following request with a GET if the HTTP response was 301, 302, or 303. If the response code was any other 3xx code, curl resends the following request using the same unmodified method.
In Hurl debugs logs, the curl command is:
* Request can be run with the following curl command:
* curl --request POST --location 'https://foo.com'
This command will NOT make a POST request followed by a GET redirection
This command will force all methods to be POST and so does not corresponds to the behavior of Hurl file.
The method string you set with -X, --request is used for all requests, which if you for example use -L, --location may cause unintended side-effects when curl does not change request method according to the HTTP 30x response codes - and similar.
With this file (follow redirection from a POST request)
Hurl 4.3.0 implements curl's behaviour:
From https://curl.se/docs/manpage.html#-L:
In Hurl debugs logs, the curl command is:
This command will NOT make a POST request followed by a GET redirection
This command will force all methods to be POST and so does not corresponds to the behavior of Hurl file.
As https://curl.se/docs/manpage.html#-X,
--location
and--request/-X
does not well play together:In https://daniel.haxx.se/blog/2015/09/11/unnecessary-use-of-curl-x/ the "right" curl command in this case should be:
The text was updated successfully, but these errors were encountered: