Options
All
  • Public
  • Public/Protected
  • All
Menu

Project @fastly/js-compute - v0.5.7

Classes

Interfaces

Type aliases

Variables

Functions

Type aliases

BodyInit: ReadableStream | ArrayBufferView | ArrayBuffer | URLSearchParams | string

Used within the Request and Response constructors. (Request, and Response)

CacheOverrideMode: "none" | "pass" | "override"

Set the cache override mode on a request

None Do not override the behavior specified in the origin response’s cache control headers. Pass Do not cache the response to this request, regardless of the origin response’s headers. Override Override particular cache control settings using a CacheOverride object.

The origin response’s cache control headers will be used for ttl and stale_while_revalidate if None.

CompressionStreamFormat: "deflate" | "deflate-raw" | "gzip"
DecompressionStreamFormat: "deflate" | "deflate-raw" | "gzip"
HeadersInit: Headers | string[][] | Record<string, string>
ReadableStreamController<T>: ReadableStreamDefaultController<T>

Type parameters

  • T

Type parameters

  • T

ReadableStreamReader<T>: ReadableStreamDefaultReader<T>

Type parameters

  • T

ReadableStreamType: "bytes"
RequestInfo: Request | string

Constructor parameter for Request

Usually this a URL to the resource you are requesting.

Transferable: ArrayBuffer

Variables

CacheOverride: object

Type declaration

CompressionStream: object

Type declaration

Crypto: object

Type declaration

DecompressionStream: object

Type declaration

Headers: object

Type declaration

ReadableStream: object

The ReadableStream class as specified by WHATWG

Type declaration

ReadableStreamDefaultController: object

Type declaration

ReadableStreamDefaultReader: object

Type declaration

Request: object

Type declaration

Response: object

Type declaration

TransformStream: object

The TransformStream class as specified by WHATWG

Type declaration

TransformStreamDefaultController: object

Type declaration

WorkerLocation: object

Type declaration

WritableStream: object

The WritableStream class as specified by WHATWG

Type declaration

WritableStreamDefaultController: object

Type declaration

WritableStreamDefaultWriter: object

Type declaration

console: Console

The global Console instance

crypto: Crypto
fastly: Fastly

The global instance of the Fastly builtin

location: WorkerLocation
self: typeof globalThis

Functions

  • addEventListener<K>(type: K, listener: EventListenerMap[K]): void
  • This is a fetch specific implementation of addEventListener, and is very similar to handling FetchEvent from a Service Worker.

    For Fastly C@E, this will be the entrypoint in handling your downstream request from your client.

    Type parameters

    • K: "fetch"

    Parameters

    • type: K
    • listener: EventListenerMap[K]

    Returns void

  • atob(data: string): string
  • The atob() function decodes a string of data which has been encoded using Base64 encoding.

    Parameters

    • data: string

      A binary string (i.e., a string in which each character in the string is treated as a byte of binary data) containing base64-encoded data.

    Returns string

    An ASCII string containing decoded data from data.

  • btoa(data: string): string
  • The btoa() method creates a Base64-encoded ASCII string from a binary string (i.e., a string in which each character in the string is treated as a byte of binary data).

    Parameters

    • data: string

      The binary string to encode.

    Returns string

    An ASCII string containing the Base64 representation of data.

  • Fetch resources from backends.

    Note: Compute@Edge requires all outgoing requests to go to a predefined backend, passed in via the backend property on the init object.

    Note: Can only be used when processing requests, not during build-time initialization.

    Parameters

    Returns Promise<Response>

Generated using TypeDoc