Skip to content
Snippets Groups Projects
Commit 7ea4067d authored by Torkel Niklasson's avatar Torkel Niklasson
Browse files

Changed curl options to char * instead of string.

Change-Id: I56e1220056b6312c99fcaba3f318b2f39b5d4c44
parent f3f2cf50
No related branches found
No related tags found
No related merge requests found
......@@ -289,13 +289,13 @@ int main(int argc, char *argv[]) {
curl = curl_easy_init();
if (curl) {
curl_easy_setopt(curl, CURLOPT_URL, url);
curl_easy_setopt(curl, CURLOPT_URL, url.c_str());
/* example.com is redirected, so we tell libcurl to follow redirection */
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
// curl_easy_setopt(curl, CURLOPT_HTTPAUTH, CURLAUTH_DIGEST);
curl_easy_setopt(curl, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
curl_easy_setopt(curl, CURLOPT_USERNAME, "root");
curl_easy_setopt(curl, CURLOPT_PASSWORD, root_passwd);
curl_easy_setopt(curl, CURLOPT_PASSWORD, root_passwd.c_str());
/* Perform the request, res will get the return code */
res = curl_easy_perform(curl);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment