Issue metadata
Sign in to add a comment
|
Copy as cURL always copies cURL requests with GET (default) method event if it has another method
Reported by
edith.ka...@gmail.com,
Jun 13 2018
|
||||||||||||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36 Steps to reproduce the problem: 1. login to a website which does POST requests 2. open the developers tool on network 3. copy one of the requests which has Request Method: POST as cURL request What is the expected behavior? cURL request will have POST in it for example: curl POST 'https://somewebsite.com/aa/aa/' What went wrong? cURL request doesn't have POST in it, default curl request without any method in it is a GET request. curl 'https://somewebsite.com/aa/aa/' Did this work before? Yes i'm not sure, but it is not the first time i use this feature Chrome version: 66.0.3359.181 Channel: n/a OS Version: OS X 10.13.4 Flash Version:
,
Jun 13 2018
,
Jun 13 2018
Thanks for the report. When a request has method: POST and no form data, the generated CURL command should include the '-X POST'. When the request does have form data, DevTools intentionally omits the inferred '-X POST' and instead adds either '--data' or '--data-binary', which tells CURL to send a POST request [1]. [1] https://curl.haxx.se/docs/manpage.html#-d Could you please confirm whether the copied CURL command has a "--data" or "--data-binary" in it somewhere?
,
Jun 14 2018
,
Jul 27
|
|||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||
Comment 1 Deleted