yuezonghe | 824eb0c | 2024-06-27 02:32:26 -0700 | [diff] [blame] | 1 | #ifndef _CURL_ADAPTER_H_ |
| 2 | #define _CURL_ADAPTER_H_ |
| 3 | |
| 4 | #include <stdlib.h> |
| 5 | #include <stdio.h> |
| 6 | #include <dmgr_api.h> |
| 7 | |
| 8 | typedef size_t(*callbackFunc)(void *ptr, size_t size, size_t nmemb, void *stream); |
| 9 | |
| 10 | int http_post(const char* url, char* post_buf, policy_info_t *policy, |
| 11 | callbackFunc func, void *ptr); |
| 12 | int http_get(const char*url, long resume_from, policy_info_t *policy, |
| 13 | callbackFunc func, void *ptr); |
| 14 | |
| 15 | int http_is_reponse_successful(long resp_code) ; |
| 16 | long http_get_response_code(); |
| 17 | |
| 18 | #endif // !_CURL_ADAPTER_H_ |