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: Alex Fontaine via curl-users <curl-users_at_cool.haxx.se>
Date: Mon, 4 Sep 2017 00:35:23 +0000

Hi Ray,

Apologies if this sounds confusing, I am struggling myself to look for my marks as I only have Html and basic IT skills.

Basically I need to call an HTTP POST SYNTHESIZE query using curl using with my personal Bluemix authentication (username and password) so that the Text to Speech API sends me back an automatic audio file in wav/ogg format.

The issue I have is that I still don't know where to enter the command on Bluemix after retrieving my my personal service credentials. I did enclose screenshots. Below is the tutorial:

https://console.bluemix.net/docs/services/text-to-speech/getting-started.html#gettingStarted


https://console.bluemix.net/docs/services/text-to-speech/http.html#using

I did sent an email to IBM support and waiting for them to answer me.

However since I had to download curl, I am still wondering if I was actually required to type the command in it...

I downloaded the WIN 64 Mingw executable and compatible SSL and added the PATH to my variables. Then I tried to launch the curl.exe file (screenshot enclosed) ; a window opens and starts processing the file but then it shuts after 5 sec with no final message nor message error.

Is there something I should do then from the curl file to link to Watson and enter the command or not? and if so what?

Many thanks!

Alex

-----Original Message-----
From: curl-users [mailto:curl-users-bounces_at_cool.haxx.se] On Behalf Of Ray Satiro via curl-users
Sent: dimanche 3 septembre 2017 19:37
To: curl-users_at_cool.haxx.se
Cc: Ray Satiro <raysatiro_at_yahoo.com>
Subject: Re: Using curl for a an HTTP POST API request- Where to type the HTTP request

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

-----------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
Etiquette: https://curl.haxx.se/mail/etiquette.html

Curl WIN64.png
Create action.png
Service credentials.png
Connection failure.png
Received on 2017-09-04