Posting to Maker (IFTTT) using curl

[Sorry, posted previously to the wrong board]

Hi there

I’m trying to activate a Maker recipe on IFTTT to cycle my Philips Hue light on and off.

I’m using a curl command supplied by Maker. The command works fine through Terminal, but won’t fire the recipe through arduino.

Here’s the code. Any suggestions?

#include <Process.h>
#include <Wire.h>
#include <Console.h>


Process p;

void setup() {
  Bridge.begin();   // Initialize the Bridge

  Console.begin();
  // Wait for Console port to connect
  //  while (!Console);


}

void loop() {
     
    delay(500);
    p.begin("curl -X POST https://maker.ifttt.com/trigger/Turn_Off/with/key/nYU642YiFwwuJApYyJTRBo2kXAWjEHAPieY9lG7grla");
    p.run();
    Serial.println("Turning Off");
      while (p.available()>0) {
    char c = p.read();
    Serial.print(c);
  }
  // Ensure the last bit of data is sent.
  Serial.flush();
    delay(20000);



   delay(500);
    p.begin("curl -X POST https://maker.ifttt.com/trigger/Turn_On/with/key/nYU642YiFwwuJApYyJTRBo2kXAWjEHAPieY9lG7grla");
    p.run();
    Serial.println("Turning On");
      while (p.available()>0) {
    char c = p.read();
    Serial.print(c);
  }
  // Ensure the last bit of data is sent.
  Serial.flush();
    delay(20000);



}
#include <Process.h>
void setup() {
 Bridge.begin();  // Initialize Bridge
}
void loop() {
 Process p;              
 p.begin("/usr/bin/curl");      
 p.addParameter("-X"); 
 p.addParameter("POST"); 
 p.addParameter("https://maker.ifttt.com/trigger/Turn_Off/with/key/nYU642YiFwwuJApYyJTRBo2kXAWjEHAPieY9lG7grla"); 
 while (p.running());
 while (p.available()) {
    char c = p.read();
    Serial.print(c);
 }
 delay(1000); 
}

http://www.ibuyopenwrt.com/index.php/2-uncategorised/208-process-class-with-return-variable