Using libcurl in photon

Hi @jvanier, thanks for your answer :smile:

I’m working on it since an hour but I’ve never done any http request before, so it’s not that easy for me, I may need some tips or advices.
I’m mostly doing POST requests


I’ve got some trouble with HttpClient.
response.status is -1 and response.body is empty after I think that this is about authentication, but I don’t know where I missed something.

Here’s my current code :

#include "application.h"
#include "HttpClient/HttpClient.h"

http_header_t headers[] = {
     { "Content-Type", "application/json" },
    //{ "Accept" , "*/*"},
    { "X-Parse-Application-Id", "<MY X PARSE APPLICATION ID"},
    {"X-Parse-REST-API-Key", "<MY X PARSE REST API KEY>"},
    { NULL, NULL } // NOTE: Always terminate headers will NULL

HttpClient http;
http_request_t request;
http_response_t response;

void setup() {
    request.hostname = "";
    request.port = 80;
    request.path = "/1/classes/Flotty";

void loop() {
    Serial.println("Application>\tStart of Loop.");
    request.body = "{\"test\":\"TOTO\"}";
    Serial.print("Body: ");
    Serial.println(request.body);, response, headers);
    Serial.print("response.status: ");
    Serial.print("response.body: ");