#include "third_party/blink/renderer/core/fetch/request.h"
#include <optional>
#include "mojo/public/cpp/bindings/pending_remote.h"
#include "services/network/public/cpp/request_destination.h"
#include "services/network/public/cpp/request_mode.h"
#include "services/network/public/mojom/attribution.mojom-blink.h"
#include "services/network/public/mojom/ip_address_space.mojom-blink.h"
#include "services/network/public/mojom/trust_tokens.mojom-blink.h"
#include "third_party/blink/public/common/blob/blob_utils.h"
#include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom-blink.h"
#include "third_party/blink/public/mojom/permissions_policy/permissions_policy_feature.mojom-blink.h"
#include "third_party/blink/public/platform/web_url_request.h"
#include "third_party/blink/renderer/bindings/core/v8/dictionary.h"
#include "third_party/blink/renderer/bindings/core/v8/idl_types.h"
#include "third_party/blink/renderer/bindings/core/v8/native_value_traits_impl.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_abort_signal.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_blob.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_form_data.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_private_token.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_readable_stream.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_request_init.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_union_request_usvstring.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_url_search_params.h"
#include "third_party/blink/renderer/core/dom/abort_signal.h"
#include "third_party/blink/renderer/core/execution_context/execution_context.h"
#include "third_party/blink/renderer/core/fetch/attribution_reporting_to_mojom.h"
#include "third_party/blink/renderer/core/fetch/blob_bytes_consumer.h"
#include "third_party/blink/renderer/core/fetch/body_stream_buffer.h"
#include "third_party/blink/renderer/core/fetch/fetch_manager.h"
#include "third_party/blink/renderer/core/fetch/form_data_bytes_consumer.h"
#include "third_party/blink/renderer/core/fetch/request_util.h"
#include "third_party/blink/renderer/core/fetch/trust_token_to_mojom.h"
#include "third_party/blink/renderer/core/fileapi/blob.h"
#include "third_party/blink/renderer/core/fileapi/public_url_manager.h"
#include "third_party/blink/renderer/core/frame/web_feature.h"
#include "third_party/blink/renderer/core/html/forms/form_data.h"
#include "third_party/blink/renderer/core/loader/threadable_loader.h"
#include "third_party/blink/renderer/core/url/url_search_params.h"
#include "third_party/blink/renderer/platform/bindings/exception_state.h"
#include "third_party/blink/renderer/platform/blob/blob_data.h"
#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
#include "third_party/blink/renderer/platform/instrumentation/use_counter.h"
#include "third_party/blink/renderer/platform/loader/cors/cors.h"
#include "third_party/blink/renderer/platform/loader/fetch/fetch_utils.h"
#include "third_party/blink/renderer/platform/loader/fetch/resource_loader_options.h"
#include "third_party/blink/renderer/platform/loader/fetch/resource_request.h"
#include "third_party/blink/renderer/platform/network/encoded_form_data.h"
#include "third_party/blink/renderer/platform/network/http_names.h"
#include "third_party/blink/renderer/platform/network/http_parsers.h"
#include "third_party/blink/renderer/platform/runtime_enabled_features.h"
#include "third_party/blink/renderer/platform/scheduler/public/frame_or_worker_scheduler.h"
#include "third_party/blink/renderer/platform/weborigin/origin_access_entry.h"
#include "third_party/blink/renderer/platform/weborigin/referrer.h"
#include "third_party/blink/renderer/platform/weborigin/security_origin.h"
#include "third_party/blink/renderer/platform/weborigin/security_policy.h"
namespace blink {
namespace {
TrustTokenOperationType;
}
FetchRequestData* CreateCopyOfFetchRequestDataForFetch(
ScriptState* script_state,
const FetchRequestData* original) { … }
static bool AreAnyMembersPresent(const RequestInit* init) { … }
static BodyStreamBuffer* ExtractBody(ScriptState* script_state,
ExceptionState& exception_state,
v8::Local<v8::Value> body,
String& content_type,
uint64_t& body_byte_length) { … }
Request* Request::CreateRequestWithRequestOrString(
ScriptState* script_state,
Request* input_request,
const String& input_string,
const RequestInit* init,
ExceptionState& exception_state) { … }
Request* Request::Create(ScriptState* script_state,
const V8RequestInfo* input,
const RequestInit* init,
ExceptionState& exception_state) { … }
Request* Request::Create(ScriptState* script_state,
const String& input,
ExceptionState& exception_state) { … }
Request* Request::Create(ScriptState* script_state,
const String& input,
const RequestInit* init,
ExceptionState& exception_state) { … }
Request* Request::Create(ScriptState* script_state,
Request* input,
ExceptionState& exception_state) { … }
Request* Request::Create(ScriptState* script_state,
Request* input,
const RequestInit* init,
ExceptionState& exception_state) { … }
Request* Request::Create(ScriptState* script_state,
FetchRequestData* request,
AbortSignal* signal) { … }
Request* Request::Create(
ScriptState* script_state,
mojom::blink::FetchAPIRequestPtr fetch_api_request,
ForServiceWorkerFetchEvent for_service_worker_fetch_event) { … }
std::optional<network::mojom::CredentialsMode> Request::ParseCredentialsMode(
const String& credentials_mode) { … }
Request::Request(ScriptState* script_state,
FetchRequestData* request,
Headers* headers,
AbortSignal* signal)
: … { … }
Request::Request(ScriptState* script_state,
FetchRequestData* request,
AbortSignal* signal)
: … { … }
String Request::method() const { … }
const KURL& Request::url() const { … }
String Request::destination() const { … }
String Request::referrer() const { … }
String Request::getReferrerPolicy() const { … }
String Request::mode() const { … }
String Request::credentials() const { … }
String Request::cache() const { … }
String Request::redirect() const { … }
String Request::integrity() const { … }
bool Request::keepalive() const { … }
String Request::targetAddressSpace() const { … }
bool Request::isHistoryNavigation() const { … }
Request* Request::clone(ScriptState* script_state,
ExceptionState& exception_state) { … }
FetchRequestData* Request::PassRequestData(ScriptState* script_state,
ExceptionState& exception_state) { … }
bool Request::HasBody() const { … }
mojom::blink::FetchAPIRequestPtr Request::CreateFetchAPIRequest() const { … }
String Request::MimeType() const { … }
String Request::ContentType() const { … }
mojom::blink::RequestContextType Request::GetRequestContextType() const { … }
network::mojom::RequestDestination Request::GetRequestDestination() const { … }
network::mojom::RequestMode Request::GetRequestMode() const { … }
void Request::Trace(Visitor* visitor) const { … }
}