diff options
Diffstat (limited to 'content/fetch.h')
-rw-r--r-- | content/fetch.h | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/content/fetch.h b/content/fetch.h index fdb3bfbd8..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); /** @@ -230,11 +254,6 @@ void fetch_free(struct fetch *f); void fetch_set_http_code(struct fetch *fetch, long http_code); /** - * get the referer from the fetch - */ -const char *fetch_get_referer_to_send(struct fetch *fetch); - -/** * set cookie data on a fetch */ void fetch_set_cookie(struct fetch *fetch, const char *data); |