summaryrefslogtreecommitdiffstats
path: root/aclk/https_client.h
diff options
context:
space:
mode:
authorTimotej S <6674623+underhood@users.noreply.github.com>2021-04-19 17:52:40 +0200
committerGitHub <noreply@github.com>2021-04-19 17:52:40 +0200
commita3c46ef3ec305bb2fa0e8f64e87e9ac8b99d6714 (patch)
treeceb5f17a21f61461bcb848f798076069fbbc408f /aclk/https_client.h
parentf569beac51534fb0fe5ca0e33d2b63dbdc2d5427 (diff)
implements ACLK env endpoint (#10833)
implements /env endpoint call and parsing of the response
Diffstat (limited to 'aclk/https_client.h')
-rw-r--r--aclk/https_client.h16
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);