# Response: Response() constructor



The **`Response()`** constructor creates a new [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) object.

## Syntax

```js-nolint
new Response()
new Response(body)
new Response(body, options)
```

### Parameters

- `body` 
  - : An object defining a body for the response. This can be `null` (which is
    the default value), or one of:
    - [Blob](https://developer.mozilla.org/en-US/docs/Web/API/Blob)
    - [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer)
    - [TypedArray](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray)
    - [DataView](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView)
    - [FormData](https://developer.mozilla.org/en-US/docs/Web/API/FormData)
    - [ReadableStream](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream)
    - [URLSearchParams](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams)
    - [String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)
    - string literal

- `options` 
  - : An options object containing any custom settings that you want to apply to the response, or an empty object (which is the default value). The possible options are:
    - `status`
      - : The status code for the response.
        The default value is `200`.
    - `statusText`
      - : The status message associated with the status code, such as `"OK"`.
        The default value is `""`.
    - `headers`
      - : Any headers you want to add to your response, contained within a [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) object or object literal of [String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) key/value pairs (see [HTTP headers](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers) for a reference).
        By default this is empty.

## Examples

In our [Fetch Response example](https://github.com/mdn/dom-examples/tree/main/fetch/fetch-response) (see [Fetch Response live](https://mdn.github.io/dom-examples/fetch/fetch-response/))
we create a new `Response` object using the constructor, passing it a new [Blob](https://developer.mozilla.org/en-US/docs/Web/API/Blob) as a body, and an init object containing a custom `status` and `statusText`:

```js
const myBlob = new Blob();
const myOptions = { status: 200, statusText: "SuperSmashingGreat!" };
const myResponse = new Response(myBlob, myOptions);
```

## Specifications

## Browser compatibility

## See also

- [ServiceWorker API](https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API)
- [HTTP access control (CORS)](https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/CORS)
- [HTTP](https://developer.mozilla.org/en-US/docs/Web/HTTP)
