Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

copy curl request from Charles, url undefine #4

Closed
rpplusplus opened this issue Oct 15, 2015 · 2 comments
Closed

copy curl request from Charles, url undefine #4

rpplusplus opened this issue Oct 15, 2015 · 2 comments

Comments

@rpplusplus
Copy link

I use Charles get curl Request, get that:

curl -H "Host: api.ipify.org" -H "Accept: */*" -H "User-Agent: GiftTalk/2.7.2 (iPhone; iOS 9.0.2; Scale/3.00)" -H "Accept-Language: en-CN;q=1, zh-Hans-CN;q=0.9" --compressed http://api.ipify.org/?format=json&

the curl write in terminal works fine, but I wrote into http://curl.trillworks.com/, got

headers = {
    'Host': 'api.ipify.org',
    'Accept': '*/*',
    'User-Agent': 'GiftTalk/2.7.2 (iPhone; iOS 9.0.2; Scale/3.00)',
    'Accept-Language': 'en-CN;q=1, zh-Hans-CN;q=0.9',
}

requests.get('undefined', headers=headers)
@NickCarneiro
Copy link
Member

This package only support curl syntax generated by Chrome. If you send a
pull request for supporting more general curl syntax I will accept it.

On Wed, Oct 14, 2015 at 6:40 PM, Xiaoxuan Tang notifications@github.com
wrote:

I use Charles http://www.charlesproxy.com/ get curl Request, get that:

curl -H "Host: api.ipify.org" -H "Accept: /" -H "User-Agent: GiftTalk/2.7.2 (iPhone; iOS 9.0.2; Scale/3.00)" -H "Accept-Language: en-CN;q=1, zh-Hans-CN;q=0.9" --compressed http://api.ipify.org/?format=json&

the curl write in terminal works fine, but I wrote into
http://curl.trillworks.com/, got

headers = {
'Host': 'api.ipify.org',
'Accept': '/',
'User-Agent': 'GiftTalk/2.7.2 (iPhone; iOS 9.0.2; Scale/3.00)',
'Accept-Language': 'en-CN;q=1, zh-Hans-CN;q=0.9',
}

requests.get('undefined', headers=headers)


Reply to this email directly or view it on GitHub
#4.

@joshuataylor
Copy link

If you want to use Charles and this tool, just move the URL right after curl and put the URL in ''.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants