Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <curl/curl.h>
- #include <curl/easy.h>
- static long send_request(CURL *curl)
- {
- long response = -1;
- curl_easy_setopt(curl, CURLOPT_URL, "https://storage101.dfw1.clouddrive.com/");
- curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
- curl_easy_perform(curl);
- curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &response);
- curl_easy_reset(curl);
- return response;
- }
- int main(int argc, char **argv)
- {
- CURL *handle = curl_easy_init();
- printf("Initial request: %ld\n", send_request(handle));
- printf("Second request: %ld\n", send_request(handle));
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement