mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 02:27:43 +00:00
LibWeb: Rename XHR::{m_method => m_request_method}
This commit is contained in:
parent
338ada66fa
commit
29a8414a05
2 changed files with 4 additions and 4 deletions
|
@ -391,7 +391,7 @@ WebIDL::ExceptionOr<void> XMLHttpRequest::open(String const& method_string, Stri
|
||||||
// Unset this’s upload listener flag.
|
// Unset this’s upload listener flag.
|
||||||
m_upload_listener = false;
|
m_upload_listener = false;
|
||||||
// Set this’s request method to method.
|
// Set this’s request method to method.
|
||||||
m_method = move(method);
|
m_request_method = move(method);
|
||||||
// Set this’s request URL to parsedURL.
|
// Set this’s request URL to parsedURL.
|
||||||
m_url = parsed_url;
|
m_url = parsed_url;
|
||||||
// Set this’s synchronous flag if async is false; otherwise unset this’s synchronous flag.
|
// Set this’s synchronous flag if async is false; otherwise unset this’s synchronous flag.
|
||||||
|
@ -429,7 +429,7 @@ WebIDL::ExceptionOr<void> XMLHttpRequest::send(Optional<DocumentOrXMLHttpRequest
|
||||||
return WebIDL::InvalidStateError::create(realm, "XHR send() flag is already set");
|
return WebIDL::InvalidStateError::create(realm, "XHR send() flag is already set");
|
||||||
|
|
||||||
// If this’s request method is `GET` or `HEAD`, then set body to null.
|
// If this’s 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 = {};
|
body = {};
|
||||||
|
|
||||||
Optional<Fetch::Infrastructure::BodyWithType> body_with_type {};
|
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());
|
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()) {
|
if (serialized_document.has_value()) {
|
||||||
request.set_body(serialized_document->to_byte_buffer());
|
request.set_body(serialized_document->to_byte_buffer());
|
||||||
} else if (body_with_type.has_value()) {
|
} else if (body_with_type.has_value()) {
|
||||||
|
|
|
@ -108,7 +108,7 @@ private:
|
||||||
// https://xhr.spec.whatwg.org/#request-method
|
// https://xhr.spec.whatwg.org/#request-method
|
||||||
// request method
|
// request method
|
||||||
// A method.
|
// A method.
|
||||||
String m_method;
|
String m_request_method;
|
||||||
|
|
||||||
// https://xhr.spec.whatwg.org/#request-url
|
// https://xhr.spec.whatwg.org/#request-url
|
||||||
// request URL
|
// request URL
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue