summaryrefslogtreecommitdiff
path: root/content/fetch.h
diff options
context:
space:
mode:
Diffstat (limited to 'content/fetch.h')
-rw-r--r--content/fetch.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/content/fetch.h b/content/fetch.h
index 843fec96e..e7180d0c3 100644
--- a/content/fetch.h
+++ b/content/fetch.h
@@ -94,6 +94,16 @@ typedef struct fetch_msg {
} fetch_msg;
/**
+ * Fetcher post data types
+ */
+typedef enum {
+ FETCH_POSTDATA_NONE,
+ FETCH_POSTDATA_URLENC,
+ FETCH_POSTDATA_MULTIPART,
+} fetch_postdata_type;
+
+
+/**
* Fetch POST multipart data
*/
struct fetch_multipart_data {
@@ -106,6 +116,20 @@ struct fetch_multipart_data {
bool file; /**< Item is a file */
};
+/**
+ * fetch POST data
+ */
+struct fetch_postdata {
+ fetch_postdata_type type;
+ union {
+ /** Url encoded POST string if type is FETCH_POSTDATA_URLENC */
+ char *urlenc;
+ /** Multipart post data if type is FETCH_POSTDATA_MULTIPART */
+ struct fetch_multipart_data *multipart;
+ } data;
+};
+
+
typedef void (*fetch_callback)(const fetch_msg *msg, void *p);
/**