navigation

Pipelines

Pipeline is a computation expression used to combine HttpHandlers in a declarative manner.

The result of the computation expression is a standard Giraffe HttpHandler which means that it's easily composable with other parts of the Giraffe ecosystem.

Example:

open Saturn

let headerPipe = pipeline {
    set_header "myCustomHeader" "abcd"
    set_header "myCustomHeader2" "zxcv"
}

let endpointPipe = pipeline {
    plug fetchSession
    plug head
    plug requestId
}

API Reference

Full API reference for pipeline CE can be found here

Full API reference for PipelineHelpers module containing useful helpers can be found here

You can also use in pipelines (using plug) any HttpHandler defined in Giraffe - documentation can be found here

namespace Saturn
val headerPipe : obj
val pipeline : PipelineBuilder
val endpointPipe : obj
val fetchSession : nxt:Giraffe.Core.HttpFunc -> ctx:AspNetCore.Http.HttpContext -> Giraffe.Core.HttpFuncResult
val head : nxt:Giraffe.Core.HttpFunc -> ctx:AspNetCore.Http.HttpContext -> Giraffe.Core.HttpFuncResult
val requestId : nxt:Giraffe.Core.HttpFunc -> ctx:AspNetCore.Http.HttpContext -> Giraffe.Core.HttpFuncResult