aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorxavi <xavi@noreply.localhost>2023-11-20 16:47:53 +0100
committerxavi <xavi@noreply.localhost>2023-11-20 16:47:53 +0100
commitb94f76033f72d4eba629a6473a2b301dd7988f97 (patch)
treeadac8adce7dc9ce6c0f880c0439cd9f3b39527ab /include
parent8f1ad3124e9e063ca0ee7c2548c747b20de3529d (diff)
parentdc8b14d99028b9235aa7d7633906a979aa08e4f9 (diff)
downloadlibweb-b94f76033f72d4eba629a6473a2b301dd7988f97.tar.gz
Merge pull request 'Add support for HTTP `PUT`' (#3) from midokura-xavi/libweb:put into master
Reviewed-on: https://gitea.privatedns.org/xavi/libweb/pulls/3
Diffstat (limited to 'include')
-rw-r--r--include/libweb/http.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/include/libweb/http.h b/include/libweb/http.h
index ddb6a89..7af66b5 100644
--- a/include/libweb/http.h
+++ b/include/libweb/http.h
@@ -16,7 +16,8 @@ struct http_payload
{
HTTP_OP_GET,
HTTP_OP_POST,
- HTTP_OP_HEAD
+ HTTP_OP_HEAD,
+ HTTP_OP_PUT
} op;
const char *resource;
@@ -30,7 +31,6 @@ struct http_payload
{
struct http_post
{
- bool expect_continue;
const char *data;
size_t nfiles, npairs;
@@ -44,6 +44,11 @@ struct http_payload
const char *name, *tmpname, *filename;
} *files;
} post;
+
+ struct http_put
+ {
+ const char *tmpname;
+ } put;
} u;
const struct http_arg
@@ -53,6 +58,7 @@ struct http_payload
size_t n_args, n_headers;
const struct http_header *headers;
+ bool expect_continue;
};
#define HTTP_STATUSES \