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

Add a json post request example #46

Open
RodolfoSilva opened this issue Mar 16, 2020 · 2 comments
Open

Add a json post request example #46

RodolfoSilva opened this issue Mar 16, 2020 · 2 comments

Comments

@RodolfoSilva
Copy link

  curl := CurlGet;
  curl.SetUrl('https://empacser.now.sh/api/sync_proxy')
    .SetCustomHeaders(
      CurlGetSlist
        .AddRaw('Content-type: application/json')
        .AddRaw('Accept: */*')
    )
    .SetProxyFromIe
    .SetOpt(CURLOPT_POST, true)
    .SetOpt(CURLOPT_POSTFIELDS, TEncoding.UTF8.GetBytes('{"xyz": 10}'))
    .SetCaFile('curl-ca-bundle.crt')
    .SetUserAgent(ChromeUserAgent)
    .SwitchRecvToString
    .Perform;
@Mercury13
Copy link
Owner

Interesting, but should make a fake server too. Or at least utilize some well-known API.

@RodolfoSilva
Copy link
Author

I think you can use this api:

https://jsonplaceholder.typicode.com/

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

No branches or pull requests

2 participants