1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 06:27:45 +00:00

LibHTTP: Make HttpRequest return its method name as a StringView

This commit is contained in:
Lucas CHOLLET 2023-02-08 22:07:52 -05:00 committed by Jelle Raaijmakers
parent 163ddf1d73
commit b46667639f
3 changed files with 16 additions and 16 deletions

View file

@ -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;