1 /* 2 ** Zabbix 3 ** Copyright (C) 2001-2021 Zabbix SIA 4 ** 5 ** This program is free software; you can redistribute it and/or modify 6 ** it under the terms of the GNU General Public License as published by 7 ** the Free Software Foundation; either version 2 of the License, or 8 ** (at your option) any later version. 9 ** 10 ** This program is distributed in the hope that it will be useful, 11 ** but WITHOUT ANY WARRANTY; without even the implied warranty of 12 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 ** GNU General Public License for more details. 14 ** 15 ** You should have received a copy of the GNU General Public License 16 ** along with this program; if not, write to the Free Software 17 ** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 18 **/ 19 20 #ifndef ZABBIX_ZBXHTTP_H 21 #define ZABBIX_ZBXHTTP_H 22 23 #include "common.h" 24 25 int zbx_http_punycode_encode_url(char **url); 26 void zbx_http_url_encode(const char *source, char **result); 27 int zbx_http_url_decode(const char *source, char **result); 28 29 #ifdef HAVE_LIBCURL 30 int zbx_http_prepare_ssl(CURL *easyhandle, const char *ssl_cert_file, const char *ssl_key_file, 31 const char *ssl_key_password, unsigned char verify_peer, unsigned char verify_host, char **error); 32 int zbx_http_prepare_auth(CURL *easyhandle, unsigned char authtype, const char *username, const char *password, 33 char **error); 34 char *zbx_http_get_header(char **headers); 35 #endif 36 37 #endif 38