# JavaScript Runtime APIs - Reponse

The `Response` interface represents an HTTP response and integrates the [Fetch API](/en/documentation/products/applications/functions/runtime-apis/javascript/fetch/).

## Constructor

```js
  let response = new Response(input [, init])
```

### Parameters

`body` optional - object that defines the response body. It can be the `null` default value or any of the following:

- [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob)
- [`BufferSource`](https://developer.mozilla.org/en-US/docs/Web/API/SourceBuffer)
- [`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)
- [`USVString`](https://developer.mozilla.org/en-US/docs/Web/API/USVString)

`init` optional - options object that contains customized options for building the Response, or an empty object, which is the default value. The options are as follows:

- `status` int - contains the response "status" code. For example, 200 for success.
- `statusText` - contains the "status" message corresponding to the "status" code. For example, OK for 200.
- `headers`- contains the [`Headers`](https://developer.mozilla.org/en-US/docs/Web/API/Headers) object  associated with the response.
- `url` - contains the response URL.

### Properties

`headers` - contains the Headers object associated with the response.

`ok` - contains a Boolean value indicating whether the response was successful when the "status" is in the range 200-299, or not.

`redirected` - indicates whether the response is the result of a redirect or not; that is, your URL list has more than one entry.

`status` - contains the response "status" code. For example, 200 for success.

`statusText` - contains the "status" message corresponding to the "status" code. For example, OK for 200.

`type` - contains the type of response. For example, basic, cors.

`url` - contains the response URL.

`useFinalURL` - contains a Boolean value indicating whether this is the final URL of the response.

Since Response implements Body, it also has the following properties available:

`body` - a simple "getter" to read from the body content via the ReadableStream interface.
`bodyUsed` - stores a Boolean that indicates whether the body has already been used in a response.

### Methods

`clone()`- creates a copy of the `Response` object.

`redirect()`- creates a new response with a different URL.

For more information on [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) visit MDN Web Docs.