diff options
author | Vincent Sanders <vince@kyllikki.org> | 2023-11-29 14:10:13 +0000 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2023-12-12 08:53:16 +0000 |
commit | da4a1a456141cc8e9b9f48c53b6adc89c622a85a (patch) | |
tree | 60a9adcb91a25f1a99dadd8a6448455a746c406d /content/fetch.h | |
parent | f68aca93b7e9f5dd05f1e49ba8ae70ada3ef3d1f (diff) | |
download | netsurf-da4a1a456141cc8e9b9f48c53b6adc89c622a85a.tar.gz netsurf-da4a1a456141cc8e9b9f48c53b6adc89c622a85a.tar.bz2 |
Remove use of depricated API after libcurl 7.56
Diffstat (limited to 'content/fetch.h')
-rw-r--r-- | content/fetch.h | 24 |
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); /** |