Skip to content

Commit

Permalink
chore(develop): update from master (#105)
Browse files Browse the repository at this point in the history
  • Loading branch information
faustbrian committed Jul 16, 2019
2 parents f176b4a + 389eccb commit 7b10dc5
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 7 deletions.
4 changes: 1 addition & 3 deletions src/http/iot/http.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,7 @@ class PlatformHTTP : public AbstractHTTP {
httpClient.setReuse(true);
httpClient.setTimeout(3000);
httpClient.begin(toHttpStr(request).c_str());
(body[0] == '{') // set the header content-type
? httpClient.addHeader("Content-Type", "application/json")
: httpClient.addHeader("Content-Type", "application/x-www-form-urlencoded");
httpClient.addHeader("Content-Type", "application/json");
httpClient.POST(body);
return httpClient.getString().c_str();
}
Expand Down
4 changes: 1 addition & 3 deletions src/http/os/http.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,7 @@ class PlatformHTTP : public AbstractHTTP {

/* set the header content-type */
curl_slist *header_list = nullptr;
header_list = (body[0] == '{')
? curl_slist_append(header_list, "Content-Type: application/json")
: curl_slist_append(header_list, "Content-Type: application/x-www-form-urlencoded");
header_list = curl_slist_append(header_list, "Content-Type: application/json");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, header_list);

/* skip https verification */
Expand Down
1 change: 0 additions & 1 deletion test/api/wallets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ TEST(api, test_wallet) { // NOLINT

TEST(api, test_wallets) { // NOLINT
Ark::Client::Connection<MockApi> connection("167.114.29.55", 4003);

const std::string expected_response = R"({
"meta": {
"count": 1,
Expand Down

0 comments on commit 7b10dc5

Please sign in to comment.