about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2016-04-15 18:50:13 -0400
committerKelly Rauchenberger <fefferburbia@gmail.com>2016-04-15 18:50:13 -0400
commita3d1ed08683c75c22d13f25e33f4333debf4f718 (patch)
tree157f3de94bcc1a67851a4606c91bf7a98d99b9ab /src
parentb276d016ee4b4125616f1f873ce32a9ce3317bb3 (diff)
downloadlibtwittercpp-a3d1ed08683c75c22d13f25e33f4333debf4f718.tar.gz
libtwittercpp-a3d1ed08683c75c22d13f25e33f4333debf4f718.tar.bz2
libtwittercpp-a3d1ed08683c75c22d13f25e33f4333debf4f718.zip
Fixed issue with multipart POSTs
Diffstat (limited to 'src')
-rw-r--r--src/client.cpp6
1 files 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 {
131 curl::curl_pair<CURLformoption, std::string> command_name(CURLFORM_COPYNAME, "command"); 131 curl::curl_pair<CURLformoption, std::string> command_name(CURLFORM_COPYNAME, "command");
132 curl::curl_pair<CURLformoption, std::string> command_cont(CURLFORM_COPYCONTENTS, "INIT"); 132 curl::curl_pair<CURLformoption, std::string> command_cont(CURLFORM_COPYCONTENTS, "INIT");
133 curl::curl_pair<CURLformoption, std::string> bytes_name(CURLFORM_COPYNAME, "total_bytes"); 133 curl::curl_pair<CURLformoption, std::string> bytes_name(CURLFORM_COPYNAME, "total_bytes");
134 curl::curl_pair<CURLformoption, std::string> bytes_cont(CURLFORM_COPYCONTENTS, std::to_string(data_length)); 134 std::string str_data_length = std::to_string(data_length);
135 curl::curl_pair<CURLformoption, std::string> bytes_cont(CURLFORM_COPYCONTENTS, str_data_length);
135 curl::curl_pair<CURLformoption, std::string> type_name(CURLFORM_COPYNAME, "media_type"); 136 curl::curl_pair<CURLformoption, std::string> type_name(CURLFORM_COPYNAME, "media_type");
136 curl::curl_pair<CURLformoption, std::string> type_cont(CURLFORM_COPYCONTENTS, media_type); 137 curl::curl_pair<CURLformoption, std::string> type_cont(CURLFORM_COPYCONTENTS, media_type);
137 form.add(command_name, command_cont); 138 form.add(command_name, command_cont);
@@ -181,7 +182,8 @@ namespace twitter {
181 curl::curl_pair<CURLformoption, std::string> command3_name(CURLFORM_COPYNAME, "command"); 182 curl::curl_pair<CURLformoption, std::string> command3_name(CURLFORM_COPYNAME, "command");
182 curl::curl_pair<CURLformoption, std::string> command3_cont(CURLFORM_COPYCONTENTS, "FINALIZE"); 183 curl::curl_pair<CURLformoption, std::string> command3_cont(CURLFORM_COPYCONTENTS, "FINALIZE");
183 curl::curl_pair<CURLformoption, std::string> media_id_name(CURLFORM_COPYNAME, "media_id"); 184 curl::curl_pair<CURLformoption, std::string> media_id_name(CURLFORM_COPYNAME, "media_id");
184 curl::curl_pair<CURLformoption, std::string> media_id_cont(CURLFORM_COPYCONTENTS, std::to_string(media_id)); 185 std::string str_media_id = std::to_string(media_id);
186 curl::curl_pair<CURLformoption, std::string> media_id_cont(CURLFORM_COPYCONTENTS, str_media_id);
185 finalize_form.add(command3_name, command3_cont); 187 finalize_form.add(command3_name, command3_cont);
186 finalize_form.add(media_id_name, media_id_cont); 188 finalize_form.add(media_id_name, media_id_cont);
187 189