mirror of
https://github.com/jlengrand/openapi-generator.git
synced 2026-05-17 08:31:23 +00:00
[CPPREST] Fixed multipart files upload implementation (#6518)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user