LibWeb: Make Fetch::Infrastructure::Request::m_method default to "GET"

ByteBuffer has an inline capacity of 32 bytes, so this isn't fallible
and can be done inline.
This commit is contained in:
Linus Groh 2022-09-25 19:28:48 +01:00
parent 924d7721f0
commit 2d57d47132
Notes: sideshowbarker 2024-07-17 06:35:42 +09:00

View file

@ -296,7 +296,7 @@ public:
private:
// https://fetch.spec.whatwg.org/#concept-request-method
// A request has an associated method (a method). Unless stated otherwise it is `GET`.
ByteBuffer m_method;
ByteBuffer m_method { ByteBuffer::copy("GET"sv.bytes()).release_value() };
// https://fetch.spec.whatwg.org/#local-urls-only-flag
// A request has an associated local-URLs-only flag. Unless stated otherwise it is unset.