mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:47:46 +00:00
LibHTTP: Make HttpRequest
return its method name as a StringView
This commit is contained in:
parent
163ddf1d73
commit
b46667639f
3 changed files with 16 additions and 16 deletions
|
@ -110,7 +110,7 @@ static constexpr auto s_webdriver_endpoints = Array {
|
|||
// https://w3c.github.io/webdriver/#dfn-match-a-request
|
||||
static ErrorOr<MatchedRoute, Error> match_route(HTTP::HttpRequest const& request)
|
||||
{
|
||||
dbgln_if(WEBDRIVER_DEBUG, "match_route({}, {})", HTTP::to_deprecated_string(request.method()), request.resource());
|
||||
dbgln_if(WEBDRIVER_DEBUG, "match_route({}, {})", HTTP::to_string_view(request.method()), request.resource());
|
||||
|
||||
auto request_path = request.resource().view();
|
||||
Vector<String> parameters;
|
||||
|
@ -129,7 +129,7 @@ static ErrorOr<MatchedRoute, Error> match_route(HTTP::HttpRequest const& request
|
|||
};
|
||||
|
||||
for (auto const& route : s_webdriver_endpoints) {
|
||||
dbgln_if(WEBDRIVER_DEBUG, "- Checking {} {}", HTTP::to_deprecated_string(route.method), route.path);
|
||||
dbgln_if(WEBDRIVER_DEBUG, "- Checking {} {}", HTTP::to_string_view(route.method), route.path);
|
||||
if (route.method != request.method())
|
||||
continue;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue