1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 08:54:58 +00:00

LibProtocol: Use URL class in RequestClient::start_request argument

This changes the RequestClient::start_request() method to take a URL
object instead of a URL string as argument. All callers of the method
already had a URL object anyway, and start_request() in turn parses the
URL string back into a URL object. This removes this unnecessary
conversion.
This commit is contained in:
Max Wipfli 2021-06-05 11:59:04 +02:00 committed by Andreas Kling
parent 5b5f7bc360
commit 30cdebfa9e
5 changed files with 7 additions and 7 deletions

View file

@ -186,7 +186,7 @@ int main(int argc, char** argv)
Core::EventLoop loop;
auto protocol_client = Protocol::RequestClient::construct();
auto request = protocol_client->start_request(method, url.to_string(), request_headers, data ? StringView { data }.bytes() : ReadonlyBytes {});
auto request = protocol_client->start_request(method, url, request_headers, data ? StringView { data }.bytes() : ReadonlyBytes {});
if (!request) {
warnln("Failed to start request for '{}'", url_str);
return 1;