Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/example12.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ int main(int argc, char *argv[])

request.setOpt(new curlpp::options::HttpHeader(header));

request.setOpt(new curlpp::options::PostFields("abcd"));
request.setOpt(new curlpp::options::PostFields((const void*)"abcd"));
request.setOpt(new curlpp::options::PostFieldSize(5));

request.perform();
Expand Down
2 changes: 1 addition & 1 deletion examples/example16.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ int main(int argc, char *argv[])

request.setOpt(new curlpp::options::HttpHeader(header));

request.setOpt(new curlpp::options::PostFields("abcd"));
request.setOpt(new curlpp::options::PostFields((const void*)"abcd"));
request.setOpt(new curlpp::options::PostFieldSize(5));

request.setOpt(new curlpp::options::UserPwd("user:password"));
Expand Down
12 changes: 0 additions & 12 deletions examples/example21.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,6 @@
anonymous namespace to prevent name clash in case other examples using the same global entities
would be compiled in the same project
*/
namespace
{

char *data = NULL;

size_t readData(char *buffer, size_t size, size_t nitems)
{
strncpy(buffer, data, size * nitems);
return size * nitems;
}

} // namespace

int main(int argc, char *argv[])
{
Expand Down
2 changes: 1 addition & 1 deletion include/curlpp/Options.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ namespace options
typedef curlpp::OptionTrait<bool, CURLOPT_PUT> Put;
typedef curlpp::OptionTrait<bool, CURLOPT_UPLOAD> Upload;
typedef curlpp::OptionTrait<bool, CURLOPT_POST> Post;
typedef curlpp::OptionTrait<std::string, CURLOPT_POSTFIELDS> PostFields;
typedef curlpp::OptionTrait<const void*, CURLOPT_POSTFIELDS> PostFields;
typedef curlpp::OptionTrait<long, CURLOPT_POSTFIELDSIZE> PostFieldSize;
typedef curlpp::OptionTrait<curl_off_t, CURLOPT_POSTFIELDSIZE_LARGE> PostFieldSizeLarge;
typedef curlpp::OptionTrait<curlpp::Forms, CURLOPT_HTTPPOST> HttpPost;
Expand Down