# Web APIs

Azion Runtime gives functions a set of standard Web APIs, and this page links the reference page of each one, grouped by family.

---

## WinterTC compliance

Azion participates in [WinterTC (TC55)](https://wintertc.org/), the Ecma International Technical Committee that standardizes a [minimum common API](https://min-common-api.proposal.wintertc.org) for web-interoperable server-side JavaScript runtimes. For code that runs on Azion Runtime, this participation means:

- Code written for Azion Runtime follows the same API standards as the other runtimes that implement the minimum common API.
- Azion works with WHATWG, W3C, and other standards bodies.
- A function built on WinterTC-compliant APIs behaves the same across the platforms that implement them.

---

## Network APIs

- [addEventListener](/en/documentation/devtools/runtime/api-reference/add-eventlistener/) - registers the handler that runs your code when a request arrives.
- [fetch](/en/documentation/devtools/runtime/api-reference/fetch/) - sends an HTTP request from a function and resolves to a `Response`.
- [FetchEvent](/en/documentation/devtools/runtime/api-reference/fetch-event/) - the event that a `fetch` listener receives, with the incoming request and `respondWith()`.
- [Request](/en/documentation/devtools/runtime/api-reference/request/) - the HTTP request a function receives, or one you build to pass to `fetch()`.
- [Response](/en/documentation/devtools/runtime/api-reference/response/) - the HTTP response a function returns, and the object `fetch()` resolves to.

---

## Encoding APIs

- [Encoding](/en/documentation/devtools/runtime/api-reference/encoding/) - converts strings to UTF-8 bytes and back with `TextEncoder` and `TextDecoder`.

---

## Web Streams APIs

- [TransformStream](/en/documentation/devtools/runtime/api-reference/transform-stream/) - changes data as it passes from a writable side to a readable side.
- [ReadableStream](/en/documentation/devtools/runtime/api-reference/readable-stream/) - reads a stream of byte data, such as the `body` of a `Response`.
- [WritableStream](/en/documentation/devtools/runtime/api-reference/writable-stream/) - writes streaming data to a destination, with its own queue and backpressure.
- [ReadableStreamBYOBReader](/en/documentation/devtools/runtime/api-reference/readable-byob-reader/) - reads a byte stream into a buffer you supply, without an extra copy.
- [ReadableStreamDefaultReader](/en/documentation/devtools/runtime/api-reference/readable-default-reader/) - reads the chunks of a `ReadableStream`, such as the body of a `fetch()` response.
- [WritableStreamDefaultWriter](/en/documentation/devtools/runtime/api-reference/stream-default-writer/) - writes to a `WritableStream` and locks it, so that no other writer can use it.

---

## Web standards APIs

- [URLPattern](/en/documentation/devtools/runtime/api-reference/url-pattern/) - matches URLs, or parts of URLs, against a pattern with capture groups.
- [structuredClone](/en/documentation/devtools/runtime/api-reference/structured-clone/) - copies complex objects with the structured clone algorithm.
- [Web standards](/en/documentation/devtools/runtime/api-reference/web-standards/) - the JavaScript standard objects that functions can use, such as `Math` and `JSON`.

---

## V8 primitives

- [WebAssembly](/en/documentation/devtools/runtime/api-reference/webassembly/) - compiles and instantiates WebAssembly modules inside a function.
- [Intl](/en/documentation/devtools/runtime/api-reference/intl/) - compares strings and formats numbers, dates, and times by language.

---

## Web Crypto APIs

- [Crypto](/en/documentation/devtools/runtime/api-reference/crypto/) - generates cryptographically strong random values and gives access to cryptographic primitives.
- [CryptoKey](/en/documentation/devtools/runtime/api-reference/crypto-key/) - a cryptographic key that a `SubtleCrypto` method returns.
- [SubtleCrypto](/en/documentation/devtools/runtime/api-reference/subtle-crypto/) - low-level cryptographic functions, such as signing, hashing, and encryption.

---

## EventTarget

- [EventTarget](/en/documentation/devtools/runtime/api-reference/event-target/) - the interface of objects that receive events and run the listeners registered for them.

---

## EdgeRuntime property

> **Note**
>
> Under `azion dev`, `EdgeRuntime` holds the string `edge-runtime`. Deployed, it holds `azion`.

Azion Runtime defines the global `EdgeRuntime` as a string. A check of its type tells your code that it runs on Azion Runtime. You can read the property in three ways, and each check enters its branch on Azion Runtime:

```javascript
if (typeof EdgeRuntime === 'string') {
  // Your logic here.
}
```

```javascript
if (typeof globalThis.EdgeRuntime === 'string') {
  // Your logic here.
}
```

```javascript
if (typeof self.EdgeRuntime === 'string') {
  // Your logic here.
}
```

---

## Supported types

Azion Runtime supports more JavaScript types and global objects than the Web APIs on this page. For more information, refer to [Globals](/en/documentation/devtools/runtime/api-reference/azion-runtime-globals/).
