Source
86
86
#define HTTP_REQUEST_PUT 2
87
87
#define HTTP_REQUEST_HEAD 3
88
88
89
89
#define HTTP_STORE_RAW 0
90
90
#define HTTP_STORE_JSON 1
91
91
92
92
void zbx_http_context_create(zbx_http_context_t *context);
93
93
void zbx_http_context_destroy(zbx_http_context_t *context);
94
94
int zbx_http_request_prepare(zbx_http_context_t *context, unsigned char request_method, const char *url, const char *query_fields, char *headers,
95
95
const char *posts, unsigned char retrieve_mode, const char *http_proxy, unsigned char follow_redirects,
96
-
const char *timeout, int max_attempts, const char *ssl_cert_file, const char *ssl_key_file,
96
+
int timeout, int max_attempts, const char *ssl_cert_file, const char *ssl_key_file,
97
97
const char *ssl_key_password, unsigned char verify_peer, unsigned char verify_host,
98
98
unsigned char authtype, const char *username, const char *password, const char *token,
99
99
unsigned char post_type, unsigned char output_format, const char *config_source_ip,
100
100
char **error);
101
101
102
102
CURLcode zbx_http_request_sync_perform(CURL *easyhandle, zbx_http_context_t *context);
103
103
int zbx_http_handle_response(CURL *easyhandle, zbx_http_context_t *context, CURLcode err, long *response_code,
104
104
char **out, char **error);
105
105
int zbx_handle_response_code(char *status_codes, long response_code, const char *out, char **error);
106
106