diff options
Diffstat (limited to 'request.h')
-rw-r--r-- | request.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -50,13 +50,13 @@ static inline void request_graphql(const char *query, char url[GRAPHQL_URL_LEN + strlen(session->shop) + 1]; sprintf(url, GRAPHQL_URL, session->shop); curl_easy_setopt(curl, CURLOPT_URL, url); + curl_easy_setopt(curl, CURLOPT_POSTFIELDS, query); struct curl_slist *list = NULL; - curl_slist_append(list, "Content-Type: application/graphql"); char header[TOKEN_HEADER_LEN + strlen(session->access_token) + 1]; sprintf(header, TOKEN_HEADER, session->access_token); curl_slist_append(list, header); + curl_slist_append(list, "Content-Type: application/graphql"); curl_easy_setopt(curl, CURLOPT_HTTPHEADER, list); - curl_easy_setopt(curl, CURLOPT_POSTFIELDS, query); curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, append); curl_easy_setopt(curl, CURLOPT_WRITEDATA, json); #ifdef DEBUG |