mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-11 18:50:50 +00:00
LibWeb: Update extract_body() to use BodyInit
This commit is contained in:
parent
8f5620b5d9
commit
54a987ad45
Notes:
sideshowbarker
2024-07-17 06:42:22 +09:00
Author: https://github.com/linusg
Commit: 54a987ad45
Pull-request: https://github.com/SerenityOS/serenity/pull/15323
Reviewed-by: https://github.com/davidot ✅
Reviewed-by: https://github.com/kennethmyhra ✅
3 changed files with 31 additions and 14 deletions
|
@ -410,7 +410,7 @@ DOM::ExceptionOr<void> XMLHttpRequest::send(Optional<Fetch::XMLHttpRequestBodyIn
|
|||
if (m_method.is_one_of("GET"sv, "HEAD"sv))
|
||||
body = {};
|
||||
|
||||
auto body_with_type = body.has_value() ? TRY_OR_RETURN_OOM(global_object(), Fetch::extract_body(realm, body.value())) : Optional<Fetch::Infrastructure::BodyWithType> {};
|
||||
auto body_with_type = body.has_value() ? TRY(Fetch::extract_body(realm, body.value())) : Optional<Fetch::Infrastructure::BodyWithType> {};
|
||||
|
||||
AK::URL request_url = m_window->associated_document().parse_url(m_url.to_string());
|
||||
dbgln("XHR send from {} to {}", m_window->associated_document().url(), request_url);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue