add query parameters example

This commit is contained in:
2019-07-15 17:35:36 +07:00
parent e47fab74a3
commit 3a80cc4863
4 changed files with 49 additions and 3 deletions

View File

@@ -439,6 +439,17 @@ namespace curly_hpp
return false;
}
char* last_url = nullptr;
if ( CURLE_OK != curl_easy_getinfo(
curlh_.get(),
CURLINFO_EFFECTIVE_URL,
&last_url) || !last_url )
{
status_ = req_status::failed;
cvar_.notify_all();
return false;
}
long http_code = 0;
if ( CURLE_OK != curl_easy_getinfo(
curlh_.get(),
@@ -451,7 +462,7 @@ namespace curly_hpp
}
try {
response_ = response(static_cast<http_code_t>(http_code));
response_ = response(last_url, static_cast<http_code_t>(http_code));
response_.content = std::move(response_content_);
response_.headers = std::move(response_headers_);
response_.uploader = std::move(breq_.uploader());