From 2bb37626c074fd1a91e18e7618e9ede668ace1a3 Mon Sep 17 00:00:00 2001 From: Brian Faust Date: Tue, 15 Jan 2019 11:13:55 +0200 Subject: [PATCH 1/4] fix: use the correct API vendor --- src/http/iot/http.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/http/iot/http.cpp b/src/http/iot/http.cpp index e38bcbae..57af0e9f 100644 --- a/src/http/iot/http.cpp +++ b/src/http/iot/http.cpp @@ -42,8 +42,7 @@ class PlatformHTTP : public AbstractHTTP /* Bad HTTP GET.\nRetrying connection.. */ delay(1000); httpClient.addHeader("Content-Type", "application/json"); - httpClient.addHeader("API-Version", "2"); - httpClient.addHeader("Accept", "application/vnd.ark.core-api.v2+json"); + httpClient.addHeader("Accept", "application/vnd.core-api.v2+json"); httpClient.begin(request); code = httpClient.GET(); count++; From 3098aeb4e6cbbe6ccb5c366d6881a8508eaed3f3 Mon Sep 17 00:00:00 2001 From: Brian Faust Date: Tue, 15 Jan 2019 11:14:11 +0200 Subject: [PATCH 2/4] fix: use the correct API vendor --- src/http/os/http.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/http/os/http.cpp b/src/http/os/http.cpp index 617858d4..4871813b 100644 --- a/src/http/os/http.cpp +++ b/src/http/os/http.cpp @@ -40,8 +40,7 @@ class PlatformHTTP : public AbstractHTTP curl_slist *header_list = nullptr; header_list = curl_slist_append(header_list, "Content-Type: application/json"); - header_list = curl_slist_append(header_list, "API-Version: 2"); - header_list = curl_slist_append(header_list, "Accept: application/vnd.ark.core-api.v2+json"); + header_list = curl_slist_append(header_list, "Accept: application/vnd.core-api.v2+json"); curl_easy_setopt(curl, CURLOPT_HTTPHEADER, header_list); /* skip https verification */ From 379c952696915194e67c49d6e18dd48a7c7c3971 Mon Sep 17 00:00:00 2001 From: Brian Faust Date: Tue, 15 Jan 2019 11:18:01 +0200 Subject: [PATCH 3/4] fix: use the correct API version header --- src/http/iot/http.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/http/iot/http.cpp b/src/http/iot/http.cpp index 57af0e9f..11effd5f 100644 --- a/src/http/iot/http.cpp +++ b/src/http/iot/http.cpp @@ -42,7 +42,7 @@ class PlatformHTTP : public AbstractHTTP /* Bad HTTP GET.\nRetrying connection.. */ delay(1000); httpClient.addHeader("Content-Type", "application/json"); - httpClient.addHeader("Accept", "application/vnd.core-api.v2+json"); + httpClient.addHeader("API-Version", "2"); httpClient.begin(request); code = httpClient.GET(); count++; From 561754fc4d907cf82c0bec61add50c4df7b6bf56 Mon Sep 17 00:00:00 2001 From: Brian Faust Date: Tue, 15 Jan 2019 11:18:04 +0200 Subject: [PATCH 4/4] fix: use the correct API version header --- src/http/os/http.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/http/os/http.cpp b/src/http/os/http.cpp index 4871813b..e4e946e3 100644 --- a/src/http/os/http.cpp +++ b/src/http/os/http.cpp @@ -40,7 +40,7 @@ class PlatformHTTP : public AbstractHTTP curl_slist *header_list = nullptr; header_list = curl_slist_append(header_list, "Content-Type: application/json"); - header_list = curl_slist_append(header_list, "Accept: application/vnd.core-api.v2+json"); + header_list = curl_slist_append(header_list, "API-Version: 2"); curl_easy_setopt(curl, CURLOPT_HTTPHEADER, header_list); /* skip https verification */