1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 03:17:35 +00:00

LibWeb: Rename XHR::{m_method => m_request_method}

This commit is contained in:
Linus Groh 2022-11-13 14:10:31 +00:00
parent 338ada66fa
commit 29a8414a05
2 changed files with 4 additions and 4 deletions

View file

@ -391,7 +391,7 @@ WebIDL::ExceptionOr<void> XMLHttpRequest::open(String const& method_string, Stri
// Unset thiss upload listener flag.
m_upload_listener = false;
// Set thiss request method to method.
m_method = move(method);
m_request_method = move(method);
// Set thiss request URL to parsedURL.
m_url = parsed_url;
// Set thiss synchronous flag if async is false; otherwise unset thiss synchronous flag.
@ -429,7 +429,7 @@ WebIDL::ExceptionOr<void> XMLHttpRequest::send(Optional<DocumentOrXMLHttpRequest
return WebIDL::InvalidStateError::create(realm, "XHR send() flag is already set");
// If thiss request method is `GET` or `HEAD`, then set body to null.
if (m_method.is_one_of("GET"sv, "HEAD"sv))
if (m_request_method.is_one_of("GET"sv, "HEAD"sv))
body = {};
Optional<Fetch::Infrastructure::BodyWithType> body_with_type {};
@ -460,7 +460,7 @@ WebIDL::ExceptionOr<void> XMLHttpRequest::send(Optional<DocumentOrXMLHttpRequest
}
auto request = LoadRequest::create_for_url_on_page(request_url, m_window->page());
request.set_method(m_method);
request.set_method(m_request_method);
if (serialized_document.has_value()) {
request.set_body(serialized_document->to_byte_buffer());
} else if (body_with_type.has_value()) {