http: Add Accept header as a parameter in requests.

This commit is contained in:
Unknown W. Brackets 2021-08-22 08:17:26 -07:00
parent 821a6a60aa
commit 4c51f4761d
7 changed files with 43 additions and 29 deletions

View file

@ -137,7 +137,7 @@ bool RemoteISOConnectScreen::FindServer(std::string &resultHost, int &resultPort
SetStatus("Loading game list from [URL]...", host, port);
http::RequestProgress progress(&scanCancelled);
code = http.GET(subdir.c_str(), &result, &progress);
code = http.GET(http::RequestParams(subdir.c_str()), &result, &progress);
http.Disconnect();
if (code != 200) {
@ -191,7 +191,7 @@ bool RemoteISOConnectScreen::FindServer(std::string &resultHost, int &resultPort
if (http.Resolve(REPORT_HOSTNAME, REPORT_PORT)) {
if (http.Connect(2, 20.0, &scanCancelled)) {
http::RequestProgress progress(&scanCancelled);
code = http.GET("/match/list", &result, &progress);
code = http.GET(http::RequestParams("/match/list"), &result, &progress);
http.Disconnect();
}
}