From a3d1ed08683c75c22d13f25e33f4333debf4f718 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Fri, 15 Apr 2016 18:50:13 -0400 Subject: Fixed issue with multipart POSTs --- src/client.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/client.cpp b/src/client.cpp index 1938af4..26f3289 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -131,7 +131,8 @@ namespace twitter { curl::curl_pair command_name(CURLFORM_COPYNAME, "command"); curl::curl_pair command_cont(CURLFORM_COPYCONTENTS, "INIT"); curl::curl_pair bytes_name(CURLFORM_COPYNAME, "total_bytes"); - curl::curl_pair bytes_cont(CURLFORM_COPYCONTENTS, std::to_string(data_length)); + std::string str_data_length = std::to_string(data_length); + curl::curl_pair bytes_cont(CURLFORM_COPYCONTENTS, str_data_length); curl::curl_pair type_name(CURLFORM_COPYNAME, "media_type"); curl::curl_pair type_cont(CURLFORM_COPYCONTENTS, media_type); form.add(command_name, command_cont); @@ -181,7 +182,8 @@ namespace twitter { curl::curl_pair command3_name(CURLFORM_COPYNAME, "command"); curl::curl_pair command3_cont(CURLFORM_COPYCONTENTS, "FINALIZE"); curl::curl_pair media_id_name(CURLFORM_COPYNAME, "media_id"); - curl::curl_pair media_id_cont(CURLFORM_COPYCONTENTS, std::to_string(media_id)); + std::string str_media_id = std::to_string(media_id); + curl::curl_pair media_id_cont(CURLFORM_COPYCONTENTS, str_media_id); finalize_form.add(command3_name, command3_cont); finalize_form.add(media_id_name, media_id_cont); -- cgit 1.4.1