---
title: DispatchFragmentRequestFn
summary: A callback type used to dispatch requests for ESI fragments.
url: https://www.fastly.com/documentation/reference/compute/sdks/cpp/fastly/esi/class.DispatchFragmentRequestFn/
---

**Kind:** Class  
**Module:** [esi](https://www.fastly.com/documentation/reference/compute/sdks/cpp/fastly/esi/)  
**Package:** compute-sdk-cpp 0.7.0  
**Source:** https://github.com/fastly/compute-sdk-cpp/blob/ff911e47be2f319e83a9cde960d2c3c5db534280/include/fastly/esi.h#L43

Include `fastly/esi.h` to use this class.

Extends `fastly::detail::rust_bridge_tags::esi::DispatchFragmentRequestFnTag`.

A callback type used to dispatch requests for ESI fragments.

## Constructor

**Source:** https://github.com/fastly/compute-sdk-cpp/blob/ff911e47be2f319e83a9cde960d2c3c5db534280/include/fastly/esi.h#L51

```cpp
template<std::convertible_to<function_type> F> fastly::esi::DispatchFragmentRequestFn::DispatchFragmentRequestFn(F &&fn)
```

**Parameters**

- `fn`: `F &&`
