FlowEndpointModule
PackageAxial.Hosting.GenHttp
Summary
| Name | Signature | Synopsis |
|---|---|---|
| Operations | ||
| flowEndpointWithOptions | flowEndpointWithOptions options getAppEnvironment mapApplicationError workflow | Lowers an endpoint Flow to the native handler expected by GenHTTP routing. |
| flowEndpoint | flowEndpoint getAppEnvironment mapApplicationError workflow | Runs a request with the runtime default log sink unless the flow installs its own. |
Operations
kind:member
flowEndpointWithOptions options getAppEnvironment mapApplicationError workflow
MemberLowers an endpoint Flow to the native handler expected by GenHTTP routing.
Parameters
| Name | Type | Description |
|---|---|---|
| options | EndpointOptions | Optional log sink; None leaves the runtime default unchanged. |
| getAppEnvironment | IRequest -> 'app | Constructs or resolves the explicit application environment for the current request. |
| mapApplicationError | 'error -> HttpResponse | Maps one expected application failure to a GenHTTP response plan. |
| workflow | Flow<HttpEndpointEnv<'app>, EndpointError<'error>, HttpResponse> | The complete endpoint Flow to execute. |
Returns
Func<IRequest, ValueTask<IResponse>>
Verification Examples
let endpoint = flowEndpoint getAppEnvironment ApiError.toResponse
Inline.Create().Post("/signups", endpoint signupEndpoint)kind:member
Runs a request with the runtime default log sink unless the flow installs its own.
Parameters
| Name | Type | Description |
|---|---|---|
| getAppEnvironment | IRequest -> 'a | |
| mapApplicationError | 'b -> HttpResponse | |
| workflow | Flow<HttpEndpointEnv<'a>, EndpointError<'b>, HttpResponse> |
Returns
Func<IRequest, ValueTask<IResponse>>

