Header menu logo FsCDK

HttpApiHelpers Module

Helper functions for creating HTTP API CORS configurations

Functions and values

Function or value Description

anyRoute path

Full Usage: anyRoute path

Parameters:
    path : string

Returns: HttpRouteKey

Creates an HTTP route key for any method

path : string
Returns: HttpRouteKey

cors allowOrigins allowMethods allowHeaders

Full Usage: cors allowOrigins allowMethods allowHeaders

Parameters:
    allowOrigins : string list
    allowMethods : CorsHttpMethod list
    allowHeaders : string list

Returns: CorsPreflightOptions

Creates CORS preflight options with common defaults

allowOrigins : string list
allowMethods : CorsHttpMethod list
allowHeaders : string list
Returns: CorsPreflightOptions

corsPermissive ()

Full Usage: corsPermissive ()

Parameters:
    () : unit

Returns: CorsPreflightOptions

Creates permissive CORS for development (allows all origins, methods, headers)

() : unit
Returns: CorsPreflightOptions

deleteRoute path

Full Usage: deleteRoute path

Parameters:
    path : string

Returns: HttpRouteKey

Creates an HTTP route key for DELETE requests

path : string
Returns: HttpRouteKey

getRoute path

Full Usage: getRoute path

Parameters:
    path : string

Returns: HttpRouteKey

Creates an HTTP route key for GET requests

path : string
Returns: HttpRouteKey

patchRoute path

Full Usage: patchRoute path

Parameters:
    path : string

Returns: HttpRouteKey

Creates an HTTP route key for PATCH requests

path : string
Returns: HttpRouteKey

postRoute path

Full Usage: postRoute path

Parameters:
    path : string

Returns: HttpRouteKey

Creates an HTTP route key for POST requests

path : string
Returns: HttpRouteKey

putRoute path

Full Usage: putRoute path

Parameters:
    path : string

Returns: HttpRouteKey

Creates an HTTP route key for PUT requests

path : string
Returns: HttpRouteKey

routeKey method path

Full Usage: routeKey method path

Parameters:
Returns: HttpRouteKey

Creates an HTTP route key for any HTTP method

method : HttpMethod
path : string
Returns: HttpRouteKey

Type something to start searching.