1 /*
2  * HTTP wrapper
3  * Copyright (c) 2012-2013, Qualcomm Atheros, Inc.
4  *
5  * This software may be distributed under the terms of the BSD license.
6  * See README for more details.
7  */
8 
9 #ifndef HTTP_UTILS_H
10 #define HTTP_UTILS_H
11 
12 struct http_ctx;
13 
14 struct http_ctx * http_init_ctx(void *upper_ctx, struct xml_node_ctx *xml_ctx);
15 void http_ocsp_set(struct http_ctx *ctx, int val);
16 void http_deinit_ctx(struct http_ctx *ctx);
17 
18 int http_download_file(struct http_ctx *ctx, const char *url,
19 		       const char *fname, const char *ca_fname);
20 char * http_post(struct http_ctx *ctx, const char *url, const char *data,
21 		 const char *content_type, const char *ext_hdr,
22 		 const char *ca_fname,
23 		 const char *username, const char *password,
24 		 const char *client_cert, const char *client_key,
25 		 size_t *resp_len);
26 const char * http_get_err(struct http_ctx *ctx);
27 
28 #endif /* HTTP_UTILS_H */
29