1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-12 16:58:39 +00:00

Add PUT and DELETE request + specific method value to HTTP API (#9909)

This commit is contained in:
Lejo 2020-07-30 00:16:21 +03:00 committed by GitHub
parent f34abaedd2
commit 715a123a33
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 98 additions and 44 deletions

View file

@ -261,11 +261,11 @@ void sendAnnounce(AnnounceAction action,
HTTPFetchRequest fetch_request;
fetch_request.url = g_settings->get("serverlist_url") + std::string("/announce");
fetch_request.post_fields["json"] = fastWriteJson(server);
fetch_request.method = HTTP_POST;
fetch_request.fields["json"] = fastWriteJson(server);
fetch_request.multipart = true;
httpfetch_async(fetch_request);
}
#endif
} // namespace ServerList