CURL / SSL

Heij :slight_smile: ,

I have some troubles with the YÚN Bridge and a process.

I want to send push-notifications over the "Pushover-Service".
To send a mess I need to connect via CURL.

So I tried to send the push-notification over the Linino-Consol. I just typed in the following and it worked wonderfully:

curl -S \-F "token=MYTOKEN" \-F "user=MYUSER" \-F "message=hello world"  \http://api.pushover.net/1/messages.json

Even if want to connect over SSL, it worked wonderfull (I just have to add -k because of certification)

curl -S \-F "token=MYTOKEN" \-F "user=MYUSER" \-F "message=hello world" \-k  \https://api.pushover.net/1/messages.json

But then I want to apply the same over the Bridge:

#include <Process.h>

void setup() {
  // Initialize Bridge
  Bridge.begin();
  
  // Initialize Serial
  Serial.begin(9600);

  // Wait until a Serial Monitor is connected.
  while (!Serial);

  // Launch "curl" command 
  Process p;             // Create a process and call it "p"
  p.begin("curl");       // launch the "curl" command
  p.addParameter("-S");   // Add a parameter
  p.addParameter("\\-F \"token=MYTOKEN\""); // Add a parameter
  p.addParameter("\\-F \"user=MYUSER\""); // Add a parameter
  p.addParameter("\\-F \"message=hello\"");                       // Add a parameter
  p.addParameter("http://api.pushover.net/1/messages.json");     // Add the URL parameter
  p.run();      // Run the process and wait for its termination
  
  //Send the requested data to the seriell monitor
  while (p.available() > 0) {
    char c = p.read();
    Serial.print(c);
  }
  // Ensure the last bit of data is sent.
  Serial.flush(); 
}

void loop() 
{
}

The server requested, that he want a connection over SSL. OK, I don't know why he need it now (over the console he did not need it), but if he want so...

I changed the URL to

 p.addParameter("https://api.pushover.net/1/messages.json");     // Add the URL parameter

and add the parameter

 p.addParameter("\\-k");

From now on, the server did not give me any answers. Just nothing happen.

Can anyone find my mistake?

Thanks in advance. (Sorry for my bad english :cold_sweat: )
waelder