## Index

### Type aliases

- PipelineStage

### Functions

- pipeline

## Type aliases

### PipelineStage

PipelineStage: FetchGenerator | [FetchGenerator, any[]]

- Defined in fly/fetch/pipeline.ts:15

PipeplineStage can either be a FetchGenerator function, or a tuple of FetchGenerator + args.

## Functions

### pipeline

- pipeline(...stages: PipelineStage[]): pipelineFetch & object

- - Defined in fly/fetch/pipeline.ts:41

  Combine multiple fetches into a single function. Allows middleware type functionality

  Example:

  ```javascript import { pipeline } from "@fly/fetch/pipeline"

  const addHeader = function(fetch){ return function(req, init){ if(typeof req === "string") req = new Request(req, init) req.headers.set("Superfly-Header", "shazam") return fetch(req, init) } }

  const p = pipeline(fetch, addHeader)

  fly.http.respondWith(p)

  @param stages fetch generator functions that apply additional logic @returns a combinedfunction that can be used anywhere that wants `fetch`

  #### Parameters

  - ##### Rest ...stages: PipelineStage[]

  #### Returns pipelineFetch & object

Generated using TypeDoc