|
|
|
@ -23,15 +23,15 @@ bool http_client_do( const void** opt )
|
|
|
|
|
for(;;){
|
|
|
|
|
switch( (long int)*opt ) {
|
|
|
|
|
case 1: // HTTP_REQ_URL
|
|
|
|
|
curl_easy_setopt(curl, CURLOPT_URL, opt[1] );
|
|
|
|
|
curl_easy_setopt(curl, CURLOPT_URL, (const char*)opt[1] );
|
|
|
|
|
opt += 2;
|
|
|
|
|
break;
|
|
|
|
|
case 2: // HTTP_REQ_HEADER
|
|
|
|
|
headers = curl_slist_append(headers, opt[1] );
|
|
|
|
|
headers = curl_slist_append(headers, (const char*)opt[1] );
|
|
|
|
|
opt += 2;
|
|
|
|
|
break;
|
|
|
|
|
case 3: // HTTP_REQ_OUTFILE
|
|
|
|
|
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, writer);
|
|
|
|
|
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, (curl_write_callback)writer);
|
|
|
|
|
curl_easy_setopt(curl, CURLOPT_WRITEDATA, opt[1] );
|
|
|
|
|
opt += 2;
|
|
|
|
|
break;
|
|
|
|
|