---
hide_title: false
hide_table_of_contents: false
pagination_next: null
pagination_prev: null
---

# FetchEvent

This is the event type for `fetch` events. It contains information about the fetch, including the request and how the receiver will treat the response.
It provides the [`event.respondWith()`](./prototype/respondWith.mdx) method, which allows us to provide a response to this fetch.

## Instance properties

- `FetchEvent.request` _**readonly**_
  - : The `Request` that was received by the application.
- `FetchEvent.client` _**readonly**_
  - : Information about the downstream client that made the request.
    While these fields are always defined on Compute, they may be _null_ when not available in testing environments
    such as Viceroy.
  - `FetchEvent.client.address` _**readonly**_
    - : A string representation of the IPv4 or IPv6 address of the downstream client.
  - `FetchEvent.client.geo` _**readonly**_
    - : Either `null`, or a [geolocation dictionary](pathname://../../fastly:geolocation/getGeolocationForIpAddress.mdx) corresponding to the IP address of the downstream client.
  - `FetchEvent.client.tlsJA3MD5` _**readonly**_
    - : Either `null` or a string representation of the JA3 hash of the TLS ClientHello message.
  - `FetchEvent.client.tlsCipherOpensslName` _**readonly**_
    - : Either `null` or a string representation of the cipher suite used to secure the client TLS connection.
  - `FetchEvent.client.tlsProtocol` _**readonly**_
    - : Either `null` or a string representation of the TLS protocol version used to secure the client TLS connection.
  - `FetchEvent.client.tlsClientCertificate` _**readonly**_
    - : Either `null` or an ArrayBuffer containing the raw client certificate in the mutual TLS handshake message. It is in PEM format. Returns an empty ArrayBuffer if this is not mTLS or available.
  - `FetchEvent.client.tlsClientHello` _**readonly**_
    - : Either `null` or an ArrayBuffer containing the raw bytes sent by the client in the TLS ClientHello message.
  - `FetchEvent.client.tlsJA4` _**readonly**_
    - : Either `null` or a string representation of the JA4 fingerprint of the TLS ClientHello message.
  - `FetchEvent.client.h2Fingerprint` _**readonly**_
    - : Either `null` or a string representation of the HTTP/2 fingerprint for HTTP/2 connections. Returns `null` for HTTP/1.1 connections.
  - `FetchEvent.client.ohFingerprint` _**readonly**_
    - : Either `null` or a string representation of the Original Header fingerprint based on the order and presence of request headers.
- `FetchEvent.server` _**readonly**_
  - : Information about the server receiving the request for the Fastly Compute service.
  - `FetchEvent.server.address` _**readonly**_
    - : A string representation of the IPv4 or IPv6 address of the server which received the request.

## Instance methods

- [`FetchEvent.respondWith()`](./prototype/respondWith.mdx)
  - : Provide (a promise for) a response for this request.
- [`FetchEvent.sendEarlyHints()`](./prototype/sendEarlyHints.mdx)
  - : Send a [103 Early Hints](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status/103) response for this request.
- [`FetchEvent.waitUntil()`](./prototype/waitUntil.mdx)
  - : Extends the lifetime of the event. Used to notify the host environment of tasks that extend beyond the returning of a response, such as streaming and caching.
