Need some quick help with Process, cURL, and GET request

I currently have a database set up on a RaspPi, on which I have a table called "temphum1". I want to send data to this table by using a GET request with the data inserted into the URL with cURL within a Process command.

Here is the two options I'm working on:

  Process p;

  p.begin("curl");
  p.addParameter(" -X");
  p.addParameter(" GET");
  p.addParameter(" -g");
  p.addParameter(" http://192.168.1.12/temphum1/put_data.php?reading=");
  p.addParameter("2014-08-03");
  p.addParameter("%2c");
  p.addParameter(String(h));
  p.addParameter("%2c");
  p.addParameter(String(t));
  p.addParameter("%2c");
  p.run();
  while(p.running());

and this:

  p.runShellCommand("curl -X GET -g http://192.168.1.12/temphum1/put_data.php?reading=2014-08-03%2c"+String(h)+"%2c"+String(t)+"%2c");

The "%2c" is the separator for the data, and the "h" and "t" variables are floats. To me, using "String(h)" and "String(t)" doesn't give any errors while compiling, but I still don't know if that will work. Plus I'm relatively new to cURL and Process.

Thanks for your time,
Tiharo

the url and all its querystring parameters are just ONE Process parameter for CURL. It should look more like

p.addParameter(" http://192.168.1.12/temphum1/put_data.php?reading=2014-08-03%2c ....

I am still quite stuck on what to do to get this to work. Currently I have this:

  Process p;
    p.begin("curl");
    p.addParameter(" http://192.168.1.12/temphum1/put_data.php?reading=2014-08-03%2c");
    p.addParameter(tmp);
    p.addParameter("%2c");
    p.addParameter(hmd);
    p.addParameter("%2c");
    p.run();

I am still not sure if the Process and cURL part of the code is correct.

Thank you,
Tiharo

Please re-read my reply

That means that you MUST NOT break the url with several addParameter: ONE url ONE addParameter with that url