Loading docs/examples/anyauthput.c +4 −0 Original line number Diff line number Diff line Loading @@ -162,6 +162,10 @@ int main(int argc, char **argv) /* Now run off and do what you've been told! */ res = curl_easy_perform(curl); /* Check for errors */ if(res != CURLE_OK) fprintf(stderr, "curl_easy_perform() failed: %s\n", curl_easy_strerror(res)); /* always cleanup */ curl_easy_cleanup(curl); Loading docs/examples/debug.c +4 −0 Original line number Diff line number Diff line Loading @@ -132,6 +132,10 @@ int main(void) curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/"); res = curl_easy_perform(curl); /* Check for errors */ if(res != CURLE_OK) fprintf(stderr, "curl_easy_perform() failed: %s\n", curl_easy_strerror(res)); /* always cleanup */ curl_easy_cleanup(curl); Loading docs/examples/fileupload.c +12 −5 Original line number Diff line number Diff line Loading @@ -64,7 +64,13 @@ int main(void) curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); res = curl_easy_perform(curl); /* Check for errors */ if(res != CURLE_OK) { fprintf(stderr, "curl_easy_perform() failed: %s\n", curl_easy_strerror(res)); } else { /* now extract transfer info */ curl_easy_getinfo(curl, CURLINFO_SPEED_UPLOAD, &speed_upload); curl_easy_getinfo(curl, CURLINFO_TOTAL_TIME, &total_time); Loading @@ -72,6 +78,7 @@ int main(void) fprintf(stderr, "Speed: %.3f bytes/sec during %.3f seconds\n", speed_upload, total_time); } /* always cleanup */ curl_easy_cleanup(curl); } Loading docs/examples/ftpgetresp.c +4 −0 Original line number Diff line number Diff line Loading @@ -60,6 +60,10 @@ int main(void) curl_easy_setopt(curl, CURLOPT_HEADERFUNCTION, write_response); curl_easy_setopt(curl, CURLOPT_WRITEHEADER, respfile); res = curl_easy_perform(curl); /* Check for errors */ if(res != CURLE_OK) fprintf(stderr, "curl_easy_perform() failed: %s\n", curl_easy_strerror(res)); /* always cleanup */ curl_easy_cleanup(curl); Loading docs/examples/ftpupload.c +4 −0 Original line number Diff line number Diff line Loading @@ -122,6 +122,10 @@ int main(void) /* Now run off and do what you've been told! */ res = curl_easy_perform(curl); /* Check for errors */ if(res != CURLE_OK) fprintf(stderr, "curl_easy_perform() failed: %s\n", curl_easy_strerror(res)); /* clean up the FTP commands list */ curl_slist_free_all (headerlist); Loading Loading
docs/examples/anyauthput.c +4 −0 Original line number Diff line number Diff line Loading @@ -162,6 +162,10 @@ int main(int argc, char **argv) /* Now run off and do what you've been told! */ res = curl_easy_perform(curl); /* Check for errors */ if(res != CURLE_OK) fprintf(stderr, "curl_easy_perform() failed: %s\n", curl_easy_strerror(res)); /* always cleanup */ curl_easy_cleanup(curl); Loading
docs/examples/debug.c +4 −0 Original line number Diff line number Diff line Loading @@ -132,6 +132,10 @@ int main(void) curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/"); res = curl_easy_perform(curl); /* Check for errors */ if(res != CURLE_OK) fprintf(stderr, "curl_easy_perform() failed: %s\n", curl_easy_strerror(res)); /* always cleanup */ curl_easy_cleanup(curl); Loading
docs/examples/fileupload.c +12 −5 Original line number Diff line number Diff line Loading @@ -64,7 +64,13 @@ int main(void) curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); res = curl_easy_perform(curl); /* Check for errors */ if(res != CURLE_OK) { fprintf(stderr, "curl_easy_perform() failed: %s\n", curl_easy_strerror(res)); } else { /* now extract transfer info */ curl_easy_getinfo(curl, CURLINFO_SPEED_UPLOAD, &speed_upload); curl_easy_getinfo(curl, CURLINFO_TOTAL_TIME, &total_time); Loading @@ -72,6 +78,7 @@ int main(void) fprintf(stderr, "Speed: %.3f bytes/sec during %.3f seconds\n", speed_upload, total_time); } /* always cleanup */ curl_easy_cleanup(curl); } Loading
docs/examples/ftpgetresp.c +4 −0 Original line number Diff line number Diff line Loading @@ -60,6 +60,10 @@ int main(void) curl_easy_setopt(curl, CURLOPT_HEADERFUNCTION, write_response); curl_easy_setopt(curl, CURLOPT_WRITEHEADER, respfile); res = curl_easy_perform(curl); /* Check for errors */ if(res != CURLE_OK) fprintf(stderr, "curl_easy_perform() failed: %s\n", curl_easy_strerror(res)); /* always cleanup */ curl_easy_cleanup(curl); Loading
docs/examples/ftpupload.c +4 −0 Original line number Diff line number Diff line Loading @@ -122,6 +122,10 @@ int main(void) /* Now run off and do what you've been told! */ res = curl_easy_perform(curl); /* Check for errors */ if(res != CURLE_OK) fprintf(stderr, "curl_easy_perform() failed: %s\n", curl_easy_strerror(res)); /* clean up the FTP commands list */ curl_slist_free_all (headerlist); Loading