mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-12 02:30:30 +09: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:
parent
5b5f7bc360
commit
30cdebfa9e
Notes:
sideshowbarker
2024-07-18 12:46:18 +09:00
Author: https://github.com/MaxWipfli
Commit: 30cdebfa9e
Pull-request: https://github.com/SerenityOS/serenity/pull/7842
5 changed files with 7 additions and 7 deletions
|
@ -16,7 +16,7 @@ RequestClient::RequestClient()
|
|||
}
|
||||
|
||||
template<typename RequestHashMapTraits>
|
||||
RefPtr<Request> RequestClient::start_request(String const& method, String const& url, HashMap<String, String, RequestHashMapTraits> const& request_headers, ReadonlyBytes request_body)
|
||||
RefPtr<Request> RequestClient::start_request(String const& method, URL const& url, HashMap<String, String, RequestHashMapTraits> const& request_headers, ReadonlyBytes request_body)
|
||||
{
|
||||
IPC::Dictionary header_dictionary;
|
||||
for (auto& it : request_headers)
|
||||
|
@ -82,5 +82,5 @@ void RequestClient::certificate_requested(i32 request_id)
|
|||
|
||||
}
|
||||
|
||||
template RefPtr<Protocol::Request> Protocol::RequestClient::start_request(String const& method, String const& url, HashMap<String, String> const& request_headers, ReadonlyBytes request_body);
|
||||
template RefPtr<Protocol::Request> Protocol::RequestClient::start_request(String const& method, String const& url, HashMap<String, String, CaseInsensitiveStringTraits> const& request_headers, ReadonlyBytes request_body);
|
||||
template RefPtr<Protocol::Request> Protocol::RequestClient::start_request(String const& method, URL const&, HashMap<String, String> const& request_headers, ReadonlyBytes request_body);
|
||||
template RefPtr<Protocol::Request> Protocol::RequestClient::start_request(String const& method, URL const&, HashMap<String, String, CaseInsensitiveStringTraits> const& request_headers, ReadonlyBytes request_body);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue