Optionalbody: BodyInit | nullOptionalinit: ResponseInitReadonlybodyReadonlybodyReadonlyheadersThe headers read-only property of the with the response.
ReadonlyokThe ok read-only property of the Response interface contains a Boolean stating whether the response was successful (status in the range 200-299) or not.
ReadonlyredirectedThe redirected read-only property of the Response interface indicates whether or not the response is the result of a request you made which was redirected.
ReadonlystatusThe status read-only property of the Response interface contains the HTTP status codes of the response.
ReadonlystatusThe statusText read-only property of the Response interface contains the status message corresponding to the HTTP status code in Response.status.
ReadonlytypeThe type read-only property of the Response interface contains the type of the response.
ReadonlyurlThe url read-only property of the Response interface contains the URL of the response.
The clone() method of the Response interface creates a clone of a response object, identical in every way, but stored in a different variable.
StaticerrorThe error() static method of the Response interface returns a new Response object associated with a network error.
StaticjsonThe json() static method of the Response interface returns a Response that contains the provided JSON data as body, and a Content-Type header which is set to application/json.
Optionalinit: ResponseInitStaticnextOptionalinit: MiddlewareResponseInitStaticredirectThe redirect() static method of the Response interface returns a Response resulting in a redirect to the specified URL.
Optionalinit: number | ResponseInitStaticrewriteOptionalinit: MiddlewareResponseInit
This class extends the Web
ResponseAPI with additional convenience methods.Read more: Next.js Docs:
NextResponse