---
name: "TSFetchCreate"
section: "3ts"
platform: "linux"
package: "trafficserver-dev"
version: "9.2.5+ds-0+deb12u4"
release: "Debian 12 (Bookworm)"
platforms: ["linux"]
url: "https://new.carta.tech/TSFetchCreate"
---

# TSFetchCreate(3ts)

traffic Server asynchronous Fetch API

## NAME

TSFetchCreate - traffic Server asynchronous Fetch API

## SYNOPSIS

```
#include <ts/ts.h>
```

- **void TSFetchPages(*TSFetchUrlParams\_t*\*)**

  - ***TSFetchSM* TSFetchUrl(const char\*, int, sockaddr const\*, *TSCont*, *TSFetchWakeUpOptions*, *TSFetchEvent*)**

  - **void TSFetchFlagSet(*TSFetchSM*, int)**

  - ***TSFetchSM* TSFetchCreate(*TSCont*, const char\*, const char\*, const char\*, struct sockaddr const\*, int)**

  - **void TSFetchHeaderAdd(*TSFetchSM*, const char\*, int, const char\*, int)**

  - **void TSFetchWriteData(*TSFetchSM*, const void\*, size\_t)**

  - **ssize\_t TSFetchReadData(*TSFetchSM*, void\*, size\_t)**

  - **void TSFetchLaunch(*TSFetchSM*)**

  - **void TSFetchDestroy(*TSFetchSM*)**

  - **void TSFetchUserDataSet(*TSFetchSM*, void\*)**

  - **void \*TSFetchUserDataGet(*TSFetchSM*)**

  - ***TSMBuffer* TSFetchRespHdrMBufGet(*TSFetchSM*)**

  - ***TSMLoc* TSFetchRespHdrMLocGet(*TSFetchSM*)**

  ## DESCRIPTION

Traffic Server provides a number of routines for fetching resources asynchronously. These API are useful to support a number of use cases that may involve sideways calls, while handling the client request. Some typical examples include centralized rate limiting framework, database lookups for login/authentication, refreshing configs in the background asynchronously, ESI etc.

## COPYRIGHT

2026, dev@trafficserver.apache.org
