Re: http_post with data in body

new topic     » goto parent     » topic index » view thread      » older message » newer message

I found two methods working with curl:

1) put the json part in a file then call

curl -i -H "Accept: application/json" -H "Content-Type: application/json; charset=UTF-8" -X POST -d @data.json http://127.0.0.1:9515/session 

2) Escape quotes in data part

curl -i -H "Accept: application/json" -H "Content-Type: application/json; charset=UTF-8" -X POST -d "{\"desiredCapabilities\": {}}" http://127.0.0.1:9515/session 

When run from within Euphoria there will be many more escape chars. As this runs with curl, it should also work with libcurl and probably also with WinHTTP (at least second solution).

Jean-Marc

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu