> For the complete documentation index, see [llms.txt](https://docs.adsecure.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.adsecure.com/api/models/request.md).

# Request

A network request recorded during the [`Analysis`](/api/models/analysis.md).

```typescript
interface Request {
  requestId: string;
  loaderId: string;
  frameId: string;
  targetVersion: string;
  url: string;
  redirectUrl: string;
  method: HttpMethods; // "GET" | "HEAD" | "POST" | "PUT" | "DELETE" | "CONNECT" | "OPTIONS" | "TRACE" | "PATCH" | "UNKNOWN"
  mixedContentType: MixedContentType; // "none" | "blockable" | "optionally-blockable"
  initialPriority: InitialPriority; // "VERY_LOW" | "LOW" | "MEDIUM" | "HIGH" | "VERY_HIGH" | "UNKNOWN"
  isLinkPreload: boolean;
  referer: string;
  referrerPolicy: ReferrerPolicy; // "" | "no-referrer" | "no-referrer-when-downgrade" | "same-origin" | "origin" | "strict-origin" | "origin-when-cross-origin" | "strict-origin-when-cross-origin" | "unsafe-url"
  status: string;
  statusText: string;
  mimeType: string;
  remoteIPAddress: string;
  remotePort: string;
  fromDiskCache: boolean;
  fromServiceWorker: boolean;
  encodedDataLength: string;
  protocol: string;
  resourceType: ResourceType; // "DOCUMENT" | "STYLESHEET" | "IMAGE" | "MEDIA" | "FONT" | "SCRIPT" | "TEXT_TRACK" | "XHR" | "FETCH" | "EVENT_SOURCE" | "WEBSOCKET" | "MANIFEST" |  "SIGNED_EXCHANGE" | "PING" | "CSP_VIOLATION_REPORT" | "OTHER" | "UNKNOWN"
  initiatorType: InitiatorType; // "PARSER" | "SCRIPT" | "PRELOAD" | "SIGNED_EXCHANGE" | "OTHER" | "UNKNOWN"
  initiatorUrl: string;
  securityState: SecurityState; // "UNKNOWN" | "NEUTRAL" | "INSECURE" | "SECURE" | "INFO"
  wallTime: string;
  startTime: MonotonicTime;
  endTime: MonotonicTime;
  error: boolean;
  errorType: string;
  errorMessage: string;
  timing: RequestTiming;
}
```

### Fields

* [`requestId`](#requestid)
* [`loaderId`](#loaderid)
* [`frameId`](#frameid)
* [`targetVersion`](#targetversion)
* [`url`](#url)
* [`redirectUrl`](#redirecturl)
* [`method`](#method)
* [`mixedContentType`](#mixedcontenttype)
* [`initialPriority`](#initialpriority)
* [`isLinkPreload`](#islinkpreload)
* [`referer`](#referer)
* [`referrerPolicy`](#referrerpolicy)
* [`status`](#status)
* [`statusText`](#statustext)
* [`mimeType`](#mimetype)
* [`remoteIPAddress`](#remoteipaddress)
* [`remotePort`](#remoteport)
* [`fromDiskCache`](#fromdiskcache)
* [`fromServiceWorker`](#fromserviceworker)
* [`encodedDataLength`](#encodeddatalength)
* [`protocol`](#protocol)
* [`resourceType`](#resourcetype)
* [`initiatorType`](#initiatortype)
* [`initiatorUrl`](#initiatorurl)
* [`securityState`](#securitystate)
* [`wallTime`](#walltime)
* [`startTime`](#starttime)
* [`endTime`](#endtime)
* [`error`](#error)
* [`errorType`](#errortype)
* [`errorMessage`](#errormessage)
* [`timing`](#timing)

## Fields

***

### `requestId`

```
version  : 1.0.0
stability: stable
```

```typescript
requestId: string;
```

The unique identifier of the network [`Request`](/api/models/request.md).

> **⚠️ Caution:** In some cases such as redirection, this identifier could be shared by more than one entry as referencing themselves to the same request:
>
> ```json
> [
>   {
>     "requestId": "10.1",
>     "status": "302"
>   },
>   {
>     "requestId": "10.1",
>     "status": "200"
>   }
> ]
> ```

***

### `loaderId`

```
version  : 1.0.0
stability: stable
```

```typescript
loaderId: string;
```

Loader's identifier that loaded the [`Request`](/api/models/request.md).

***

### `frameId`

```
version  : 1.0.0
stability: stable
```

```typescript
frameId: string;
```

Frame's identifier that loaded the [`Request`](/api/models/request.md).

***

### `targetVersion`

```
version  : 1.0.0
stability: stable
```

```typescript
targetVersion: string;
```

Target's version when the [`Request`](/api/models/request.md) was loaded.

***

### `url`

```
version  : 1.0.0
stability: stable
```

```typescript
url: string;
```

The [`Request`](/api/models/request.md)'s URL.

***

### `redirectUrl`

```
version  : 1.0.0
stability: stable
```

```typescript
redirectUrl: string;
```

If the request is a redirect, this field will contain the URL that it has redirected to.

***

### `method`

```
version  : 1.0.0
stability: stable
```

```typescript
method: HttpMethods;
```

```typescript
enum HttpMethods {
  Get = "GET",
  Head = "HEAD",
  Post = "POST",
  Put = "PUT",
  Delete = "DELETE",
  Connect = "CONNECT",
  Options = "OPTIONS",
  Trace = "TRACE",
  Patch = "PATCH",
  Unknown = "UNKNOWN",
}
```

The HTTP request method.

***

### `mixedContentType`

```
version  : 1.0.0
stability: stable
```

```typescript
mixedContentType: MixedContentType;
```

```typescript
enum MixedContentType {
  None = "none",
  Blockable = "blockable",
  OptionallyBlockable = "optionally-blockable",
}
```

A description of mixed content (HTTP resources on HTTPS pages), as defined by the [W3C Content Categories](https://www.w3.org/TR/mixed-content/#categories).

***

### `initialPriority`

```
version  : 1.0.0
stability: stable
```

```typescript
initialPriority: InitialPriority;
```

```typescript
enum InitialPriority {
  VeryLow = "VERY_LOW",
  Low = "LOW",
  Medium = "MEDIUM",
  High = "HIGH",
  VeryHigh = "VERY_HIGH",
  Unknown = "UNKNOWN",
}
```

The resource's request priority at the time where the request was sent.

***

### `isLinkPreload`

```
version  : 1.0.0
stability: stable
```

```typescript
isLinkPreload: boolean;
```

Whether the request is loaded via link preload or not.

***

### `referer`

```
version  : 1.0.0
stability: stable
```

```typescript
referer: string;
```

Referer's that loaded the [`Request`](/api/models/request.md).

***

### `referrerPolicy`

```
version  : 1.0.0
stability: stable
```

```typescript
referrerPolicy: ReferrerPolicy;
```

```typescript
enum ReferrerPolicy {
  None = "",
  UnsafeUrl = "unsafe-url",
  NoReferrerWhenDowngrade = "no-referrer-when-downgrade",
  NoReferrer = "no-referrer",
  Origin = "origin",
  OriginWhenCrossOrigin = "origin-when-cross-origin",
  SameOrigin = "same-origin",
  StrictOrigin = "strict-origin",
  StrictOriginWhenCrossOrigin = "strict-origin-when-cross-origin",
}
```

The referrer policy of the request, as defined in the [W3C Recommendation](https://www.w3.org/TR/referrer-policy/).

***

### `status`

```
version  : 1.0.0
stability: stable
```

```typescript
status: string;
```

HTTP response status code.

***

### `statusText`

```
version  : 1.0.0
stability: stable
```

```typescript
statusText: string;
```

HTTP response status text.

***

### `mimeType`

```
version  : 1.0.0
stability: stable
```

```typescript
mimeType: string;
```

Resource's mimeType as determined by the browser.

***

### `remoteIPAddress`

```
version  : 1.0.0
stability: stable
```

```typescript
remoteIPAddress: string;
```

Remote IP address.

***

### `remotePort`

```
version  : 1.0.0
stability: stable
```

```typescript
remotePort: string;
```

Remote port.

***

### `fromDiskCache`

```
version  : 1.0.0
stability: stable
```

```typescript
fromDiskCache: boolean;
```

Whether the request was served from the disk cache or not.

***

### `fromServiceWorker`

```
version  : 1.0.0
stability: stable
```

```typescript
fromServiceWorker: boolean;
```

Whether the request was served from the ServiceWorker or not.

***

### `encodedDataLength`

```
version  : 1.0.0
stability: stable
```

```typescript
encodedDataLength: string;
```

Total number of bytes received for this request.

***

### `protocol`

```
version  : 1.0.0
stability: stable
```

```typescript
protocol: string;
```

Protocol used to fetch this request.

***

### `resourceType`

```
version  : 1.0.0
stability: stable
```

```typescript
resourceType: ResourceType;
```

```typescript
enum ResourceType {
  Document = "DOCUMENT",
  Stylesheet = "STYLESHEET",
  Image = "IMAGE",
  Media = "MEDIA",
  Font = "FONT",
  Script = "SCRIPT",
  TextTrack = "TEXT_TRACK",
  XHR = "XHR",
  Fetch = "FETCH",
  EventSource = "EVENTSOURCE",
  Websocket = "WEBSOCKET",
  Manifest = "MANIFEST",
  SignedExchange = "SIGNED_EXCHANGE",
  Ping = "PING",
  CSPViolationReport = "CSP_VIOLATION_REPORT",
  Other = "OTHER",
  Unknown = "UNKNOWN",
}
```

Resource type as it was perceived by the rendering engine.

***

### `initiatorType`

```
version  : 1.0.0
stability: stable
```

```typescript
initiatorType: InitiatorType;
```

```typescript
enum InitiatorType {
  Parser = "PARSER",
  Script = "SCRIPT",
  Preload = "PRELOAD",
  SignedExchange = "SIGNED_EXCHANGE",
  Other = "OTHER",
  Unknown = "UNKNOWN",
}
```

Type of the request's initiator.

***

### `initiatorUrl`

```
version  : 1.0.0
stability: stable
```

```typescript
initiatorUrl: string;
```

Initiator URL, set for Parser type or for Script type (when script is importing module).

***

### `securityState`

```
version  : 1.0.0
stability: stable
```

```typescript
securityState: SecurityState;
```

```typescript
enum SecurityState {
  Unknown = "UNKNOWN",
  Neutral = "NEUTRAL",
  Insecure = "INSECURE",
  Secure = "SECURE",
  Info = "INFO",
}
```

The security level of a page or resource.

***

### `wallTime`

```
version  : 1.0.0
stability: stable
```

```typescript
wallTime: string;
```

Timestamp since epoch.

***

### `startTime`

```
version  : 1.0.0
stability: stable
```

```typescript
startTime: MonotonicTime;
```

An [`MonotonicTime`](/api/terms.md#monotonictime) that reflects the relative time since the initial request was send.

***

### `endTime`

```
version  : 1.0.0
stability: stable
```

```typescript
endTime: MonotonicTime;
```

An [`MonotonicTime`](/api/terms.md#monotonictime) that reflects the relative time since the response was fully loaded.

***

### `error`

```
version  : 1.0.0
stability: stable
```

```typescript
error: boolean;
```

Whether the [`Request`](/api/models/request.md) returned an error.

***

### `errorType`

```
version  : 1.0.0
stability: stable
```

```typescript
errorType: string;
```

Type of the [`error`](/api/models/request.md#error) that occurred.

***

### `errorMessage`

```
version  : 1.0.0
stability: stable
```

```typescript
errorMessage: string;
```

Message of the [`error`](/api/models/request.md#error) that occurred.

***

### `timing`

```
version  : 1.0.0
stability: stable
```

```typescript
timing: RequestTiming;
```

```typescript
interface RequestTiming {
  requestTime: MonotonicTime;
  proxyStart: string;
  proxyEnd: string;
  dnsStart: string;
  dnsEnd: string;
  connectStart: string;
  connectEnd: string;
  sslStart: string;
  sslEnd: string;
  workerStart: string;
  workerReady: string;
  sendStart: string;
  sendEnd: string;
  pushStart: string;
  pushEnd: string;
  receiveHeadersEnd: string;
}
```

Timing information for the request.

> The timing's `requestTime` is a baseline in seconds (see [`MonotonicTime`](/api/terms.md#monotonictime)), while the other numbers are ticks in milliseconds relatively to this `requestTime`.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.adsecure.com/api/models/request.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
