From 2d542a79796fb4568871c4a634ce4d3b311ffd9d Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Sun, 4 Aug 2019 11:33:58 +0200 Subject: Fixed curl call orders --- restapi/auth.c | 1 + 1 file changed, 1 insertion(+) (limited to 'restapi/auth.c') diff --git a/restapi/auth.c b/restapi/auth.c index e3f1b74..ad13798 100644 --- a/restapi/auth.c +++ b/restapi/auth.c @@ -60,6 +60,7 @@ restapi_login(const char* username, const char* password) printf("userid: %s\nauthtoken: %s\n", userId->valuestring, authToken->valuestring); http_add_header("X-User-Id", userId->valuestring); http_add_header("X-Auth-Token", authToken->valuestring); + http_add_header("Content-type", "application/json"); } else { const cJSON* msg = cJSON_GetObjectItemCaseSensitive(json, "message"); if (cJSON_IsString(msg) && msg->valuestring != NULL) -- cgit v1.2.3