1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-01 17:38:41 +00:00

Don't restrict multipart requests to POST

This commit is contained in:
sfan5 2025-04-25 15:19:28 +02:00
parent 4164cea58f
commit d937cd9b90
3 changed files with 45 additions and 42 deletions

View file

@ -55,23 +55,22 @@ struct HTTPFetchRequest
long connect_timeout;
// Indicates if this is multipart/form-data or
// application/x-www-form-urlencoded. POST-only.
// application/x-www-form-urlencoded. Not allowed for GET.
bool multipart = false;
// The Method to use default = GET
// Avaible methods GET, POST, PUT, DELETE
// Method to use
HttpMethod method = HTTP_GET;
// Fields of the request
StringMap fields;
// Raw data of the request (instead of fields)
// Raw data of the request (instead of fields, ignored if multipart)
std::string raw_data;
// If not empty, should contain entries such as "Accept: text/html"
std::vector<std::string> extra_headers;
// useragent to use
// User agent to send
std::string useragent;
HTTPFetchRequest();