New issue
Advanced search Search tips

Issue 852354 link

Starred by 1 user

Issue metadata

Status: Archived
Owner:
Closed: Jul 27
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug-Regression



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 description

UserAgent: 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:
 

Comment 1 Deleted

Labels: Needs-Milestone Needs-Bisect

Comment 3 by l...@chromium.org, Jun 13 2018

Labels: Needs-Feedback
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?

Comment 4 by l...@chromium.org, Jun 14 2018

Owner: l...@chromium.org
Status: Assigned (was: Unconfirmed)
Status: Archived (was: Assigned)

Sign in to add a comment