diff options
Diffstat (limited to '')
-rw-r--r-- | restapi/auth.c | 1 | ||||
-rw-r--r-- | restapi/im.c | 1 |
2 files changed, 1 insertions, 1 deletions
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) diff --git a/restapi/im.c b/restapi/im.c index 6b9f75c..0c49cb0 100644 --- a/restapi/im.c +++ b/restapi/im.c @@ -22,7 +22,6 @@ restapi_im_close(const char* username) strcpy(login_args, LOGIN_ARG_PRE); strcpy(login_args + pre_len, username); strcpy(login_args + pre_len + user_len, LOGIN_ARG_POST); - http_add_header("Content-type", "application/json"); const char* buffer = http_post("/api/v1/im.close", login_args); free(login_args); |