diff options
Diffstat (limited to 'aclk/https_client.h')
-rw-r--r-- | aclk/https_client.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/aclk/https_client.h b/aclk/https_client.h index b513c6c799..f7bc3d43d6 100644 --- a/aclk/https_client.h +++ b/aclk/https_client.h @@ -34,6 +34,22 @@ typedef struct { size_t payload_size; } https_req_response_t; + +// Non feature complete URL parser +// feel free to extend when needed +// currently implements only what ACLK +// needs +// proto://host[:port]/path +typedef struct { + char *proto; + char *host; + int port; + char* path; +} url_t; + +int url_parse(const char *url, url_t *parsed); +void url_t_destroy(url_t *url); + void https_req_response_free(https_req_response_t *res); void https_req_response_init(https_req_response_t *res); |