Skip to main content
Version: 1.8.0


The Request() constructor creates a new Request object.


new Request(input)
new Request(input, options)


  • input

    • : Defines the resource that you wish to fetch. This can either be:

      • A string containing the direct URL of the resource you want to fetch.
      • A Request object, effectively creating a copy.
  • options optional

    • : An object containing any custom settings that you want to apply to the request. The possible options are:

      • method
        • : The request method, e.g., GET, POST. The default is GET.
      • headers
        • : Any headers you want to add to your request, contained within a Headers object or an object literal with String values.
      • body
        • : Any body that you want to add to your request: this can be an ArrayBuffer, a TypedArray, a DataView, a URLSearchParams, string object or literal, or a ReadableStream object.
      • backend Fastly-specific
      • cacheOverride Fastly-specific
      • cacheKey Fastly-specific