curl / Mailing Lists / curl-users / Single Mail

curl-users

Re: Using curl for a an HTTP POST API request- Where to type the HTTP request

From: Ray Satiro via curl-users <curl-users_at_cool.haxx.se>
Date: Sun, 3 Sep 2017 13:36:57 -0400

On 9/3/2017 8:34 AM, Alex Fontaine via curl-users wrote:
> I tried to launch the curl exe file, some files start to download but
> then it stops, as if something is missing. I read most of the docs
> both on curl and bluemix websites but am still confused on how and
> where to type the HTTP request on the command line tool so that it
> links to the API and send me back an audio file.

This isn't telling us much. Can you link to the documentation page you
are referring to and show us the actual command line you tried? Edit out
personal info such as passwords and authentication contents. Is it only
bluemix you are having the problem with?

Besides sending REST requests with curl you could also pipe the output
to some other utility to extract what you want from the reply. For
example bluemix replies seem to be JSON so you could use jq [1]. For
example here is jq extracting the curl latest release info:

curl -fLsS --proto =https
https://api.github.com/repos/curl/curl/releases/latest | jq --raw-output
".tag_name | select(type == \"string\")"

[1]: https://stedolan.github.io/jq/tutorial/

-----------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2017-09-03