Http Module

Types and nested modules

Type/Module Description

HttpContext (Module)

A module that provides functions to create a new `HttpContext`.

HttpCookie (Module)

HttpMethod (Module)

HttpRequest (Module)

HttpResult (Module)

HttpRuntime (Module)

a module that gives you the `empty` (beware) and `create` functions for creating a `HttpRuntime`

ErrorHandler

A `WebPart` is an asynchronous function that transforms the `HttpContext`. An asynchronous return value of `None` indicates 'did not handle'. An error handler takes the exception, a programmer-provided message, a request (that failed) and returns an asynchronous workflow for the handling of the error.

HttpCode

The standard HTTP response codes

HttpContent

HttpContext (Type)

The `HttpContext` is the container of the request, runtime, user-state and response.

HttpCookie (Type)

HTTP cookie

HttpMethod (Type)

These are the known HTTP methods. See http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html

HttpRequest (Type)

A holder for the data extracted from the request.

HttpResult (Type)

The `HttpResult` is the structure that you work with to tell Suave how to send the response. Have a look at the docs for `HttpContent` for further details on what is possible.

HttpRuntime (Type)

The `HttpRuntime` is created from the `SuaveConfig` structure when the web server starts. You can also use the `HttpRuntime` module to create a new value yourself, or use the `empty` one.

HttpStatus

A HTTP status code and reason message

SameSite

WebPart

Functions and values

Function or value Description

context apply context

Full Usage: context apply context

Parameters:
Returns: 'a
apply : HttpContext -> HttpContext -> 'a
context : HttpContext
Returns: 'a

request apply context

Full Usage: request apply context

Parameters:
Returns: 'a
apply : HttpRequest -> HttpContext -> 'a
context : HttpContext
Returns: 'a