[CPPREST] Fixed multipart files upload implementation (#6518)

This commit is contained in:
Vlad Frolov
2017-09-29 10:46:16 +03:00
committed by wing328
parent 8e854dc744
commit 924a8e5efe
7 changed files with 6 additions and 69 deletions

View File

@@ -98,9 +98,6 @@ pplx::task<void> StoreApi::deleteOrder(utility::string_t orderId)
throw ApiException(415, U("StoreApi->deleteOrder does not consume any supported media type"));
}
//Set the request content type in the header.
headerParams[U("Content-Type")] = requestHttpContentType;
return m_ApiClient->callApi(path, U("DELETE"), queryParams, httpBody, headerParams, formParams, fileParams, requestHttpContentType)
.then([=](web::http::http_response response)
@@ -196,9 +193,6 @@ pplx::task<std::map<utility::string_t, int32_t>> StoreApi::getInventory()
throw ApiException(415, U("StoreApi->getInventory does not consume any supported media type"));
}
//Set the request content type in the header.
headerParams[U("Content-Type")] = requestHttpContentType;
// authentication (api_key) required
{
utility::string_t apiKey = apiConfiguration->getApiKey(U("api_key"));
@@ -327,9 +321,6 @@ pplx::task<std::shared_ptr<Order>> StoreApi::getOrderById(int64_t orderId)
throw ApiException(415, U("StoreApi->getOrderById does not consume any supported media type"));
}
//Set the request content type in the header.
headerParams[U("Content-Type")] = requestHttpContentType;
return m_ApiClient->callApi(path, U("GET"), queryParams, httpBody, headerParams, formParams, fileParams, requestHttpContentType)
.then([=](web::http::http_response response)
@@ -463,9 +454,6 @@ pplx::task<std::shared_ptr<Order>> StoreApi::placeOrder(std::shared_ptr<Order> b
throw ApiException(415, U("StoreApi->placeOrder does not consume any supported media type"));
}
//Set the request content type in the header.
headerParams[U("Content-Type")] = requestHttpContentType;
return m_ApiClient->callApi(path, U("POST"), queryParams, httpBody, headerParams, formParams, fileParams, requestHttpContentType)
.then([=](web::http::http_response response)