Skip to main content
Version: 1.8.0


The Response() constructor creates a new Response object.


new Response()
new Response(body)
new Response(body, options)


  • body optional

  • options optional

    • : 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, e.g., 200.
      • statusText
        • : The status message associated with the status code, e.g., OK.
      • headers
        • : Any headers you want to add to your response, contained within a Headers object or object literal of String key/value pairs.