Gets Module
Contains operations for adding HTTP GET
endpoints.
Example
let app =
webApp {
get "/hello" (fun () -> "🌎")
}
let app =
webApp {
get "/api/clowns/{id}" (fun (db : IDataAccess) id -> db.Get id)
}
open type Microsoft.AspNetCore.Http.StatusCodes
let app =
webApp {
get "/api/clowns/{id}"
[Status200OK, typeof<Clown>]
(fun (db : IDataAccess) id -> db.Get id)
}
open type Microsoft.AspNetCore.Http.StatusCodes
let app =
webApp {
get "/hello" [
Status200OK, typeof<string>
Status404NotFound, null
] (fun () ->
if DateTime.Today.DayOfWeek = DayOfWeek.Monday then Results.NotFound ()
else Results.Ok "🌎"
) (fun routeHandler ->
routeHandler.WithOpenApi (fun op -> op.Description <- "Hello, 🌎 — unless it's Monday."; op)
routeHandler.AllowAnonymous ()
)
}
val string: value: 'T -> string
--------------------
type string = System.String
Type extensions
Type extension | Description |
Full Usage:
get pattern handler ?configure
Parameters:
Pattern
handler : Func<'a, 'b>
?configure : RouteHandlerBuilder -> 'a0
Returns: WebApplication
|
Extended Type:
|
Full Usage:
get pattern handler ?configure
Parameters:
Pattern
handler : Func<'a, 'b, 'c>
?configure : RouteHandlerBuilder -> 'd
Returns: WebApplication
|
Extended Type:
|
Full Usage:
get pattern handler ?configure
Parameters:
Pattern
handler : Func<'a, 'b, 'c, 'd>
?configure : RouteHandlerBuilder -> 'e
Returns: WebApplication
|
Extended Type:
|
Full Usage:
get pattern handler ?configure
Parameters:
Pattern
handler : Func<'a, 'b, 'c, 'd, 'e>
?configure : RouteHandlerBuilder -> 'f
Returns: WebApplication
|
Extended Type:
|
Full Usage:
get pattern handler ?configure
Parameters:
Pattern
handler : Func<'a, 'b, 'c, 'd, 'e, 'f>
?configure : RouteHandlerBuilder -> 'g
Returns: WebApplication
|
Extended Type:
|
Full Usage:
get pattern handler ?configure
Parameters:
Pattern
handler : Func<'a, 'b, 'c, 'd, 'e, 'f, 'g>
?configure : RouteHandlerBuilder -> 'h
Returns: WebApplication
|
Extended Type:
|
Full Usage:
get pattern handler ?configure
Parameters:
Pattern
handler : Func<'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h>
?configure : RouteHandlerBuilder -> 'i
Returns: WebApplication
|
Extended Type:
|
Full Usage:
get pattern handler ?configure
Parameters:
Pattern
handler : Func<'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, 'i>
?configure : RouteHandlerBuilder -> 'j
Returns: WebApplication
|
Extended Type:
|
Full Usage:
get pattern handler ?configure
Parameters:
Pattern
handler : Func<'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, 'i, 'j>
?configure : RouteHandlerBuilder -> 'k
Returns: WebApplication
|
Extended Type:
|
Full Usage:
get pattern handler ?configure
Parameters:
Pattern
handler : Func<'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, 'i, 'j, 'k>
?configure : RouteHandlerBuilder -> 'l
Returns: WebApplication
|
Extended Type:
|
Full Usage:
get pattern handler ?configure
Parameters:
Pattern
handler : Func<'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, 'i, 'j, 'k, 'l>
?configure : RouteHandlerBuilder -> 'm
Returns: WebApplication
|
Extended Type:
|
Full Usage:
get pattern handler ?configure
Parameters:
Pattern
handler : Func<'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, 'i, 'j, 'k, 'l, 'm>
?configure : RouteHandlerBuilder -> 'n
Returns: WebApplication
|
Extended Type:
|
Full Usage:
get pattern handler ?configure
Parameters:
Pattern
handler : Func<'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, 'i, 'j, 'k, 'l, 'm, 'n>
?configure : RouteHandlerBuilder -> 'o
Returns: WebApplication
|
Extended Type:
|
Full Usage:
get pattern handler ?configure
Parameters:
Pattern
handler : Func<'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, 'i, 'j, 'k, 'l, 'm, 'n, 'o>
?configure : RouteHandlerBuilder -> 'p
Returns: WebApplication
|
Extended Type:
|
Full Usage:
get pattern handler ?configure
Parameters:
Pattern
handler : Func<'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, 'i, 'j, 'k, 'l, 'm, 'n, 'o, 'p>
?configure : RouteHandlerBuilder -> 'q
Returns: WebApplication
|
Extended Type:
|
Full Usage:
get pattern handler ?configure
Parameters:
Pattern
handler : Func<'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, 'i, 'j, 'k, 'l, 'm, 'n, 'o, 'p, 'q>
?configure : RouteHandlerBuilder -> 'r
Returns: WebApplication
|
Extended Type:
|
Full Usage:
get pattern produces handler ?configure
Parameters:
Pattern
produces : (int * Type) list
handler : Func<'a, 'b>
?configure : RouteHandlerBuilder -> 'a0
Returns: WebApplication
|
Extended Type:
|
Full Usage:
get pattern produces handler ?configure
Parameters:
Pattern
produces : (int * Type) list
handler : Func<'a, 'b, 'c>
?configure : RouteHandlerBuilder -> 'd
Returns: WebApplication
|
Extended Type:
|
Full Usage:
get pattern produces handler ?configure
Parameters:
Pattern
produces : (int * Type) list
handler : Func<'a, 'b, 'c, 'd>
?configure : RouteHandlerBuilder -> 'e
Returns: WebApplication
|
Extended Type:
|
Full Usage:
get pattern produces handler ?configure
Parameters:
Pattern
produces : (int * Type) list
handler : Func<'a, 'b, 'c, 'd, 'e>
?configure : RouteHandlerBuilder -> 'f
Returns: WebApplication
|
Extended Type:
|
Full Usage:
get pattern produces handler ?configure
Parameters:
Pattern
produces : (int * Type) list
handler : Func<'a, 'b, 'c, 'd, 'e, 'f>
?configure : RouteHandlerBuilder -> 'g
Returns: WebApplication
|
Extended Type:
|
Full Usage:
get pattern produces handler ?configure
Parameters:
Pattern
produces : (int * Type) list
handler : Func<'a, 'b, 'c, 'd, 'e, 'f, 'g>
?configure : RouteHandlerBuilder -> 'h
Returns: WebApplication
|
Extended Type:
|
Full Usage:
get pattern produces handler ?configure
Parameters:
Pattern
produces : (int * Type) list
handler : Func<'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h>
?configure : RouteHandlerBuilder -> 'i
Returns: WebApplication
|
Extended Type:
|
Full Usage:
get pattern produces handler ?configure
Parameters:
Pattern
produces : (int * Type) list
handler : Func<'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, 'i>
?configure : RouteHandlerBuilder -> 'j
Returns: WebApplication
|
Extended Type:
|
Full Usage:
get pattern produces handler ?configure
Parameters:
Pattern
produces : (int * Type) list
handler : Func<'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, 'i, 'j>
?configure : RouteHandlerBuilder -> 'k
Returns: WebApplication
|
Extended Type:
|
Full Usage:
get pattern produces handler ?configure
Parameters:
Pattern
produces : (int * Type) list
handler : Func<'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, 'i, 'j, 'k>
?configure : RouteHandlerBuilder -> 'l
Returns: WebApplication
|
Extended Type:
|
Full Usage:
get pattern produces handler ?configure
Parameters:
Pattern
produces : (int * Type) list
handler : Func<'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, 'i, 'j, 'k, 'l>
?configure : RouteHandlerBuilder -> 'm
Returns: WebApplication
|
Extended Type:
|
Full Usage:
get pattern produces handler ?configure
Parameters:
Pattern
produces : (int * Type) list
handler : Func<'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, 'i, 'j, 'k, 'l, 'm>
?configure : RouteHandlerBuilder -> 'n
Returns: WebApplication
|
Extended Type:
|
Full Usage:
get pattern produces handler ?configure
Parameters:
Pattern
produces : (int * Type) list
handler : Func<'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, 'i, 'j, 'k, 'l, 'm, 'n>
?configure : RouteHandlerBuilder -> 'o
Returns: WebApplication
|
Extended Type:
|
Full Usage:
get pattern produces handler ?configure
Parameters:
Pattern
produces : (int * Type) list
handler : Func<'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, 'i, 'j, 'k, 'l, 'm, 'n, 'o>
?configure : RouteHandlerBuilder -> 'p
Returns: WebApplication
|
Extended Type:
|
Full Usage:
get pattern produces handler ?configure
Parameters:
Pattern
produces : (int * Type) list
handler : Func<'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, 'i, 'j, 'k, 'l, 'm, 'n, 'o, 'p>
?configure : RouteHandlerBuilder -> 'q
Returns: WebApplication
|
Extended Type:
|
Full Usage:
get pattern produces handler ?configure
Parameters:
Pattern
produces : (int * Type) list
handler : Func<'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, 'i, 'j, 'k, 'l, 'm, 'n, 'o, 'p, 'q>
?configure : RouteHandlerBuilder -> 'r
Returns: WebApplication
|
Extended Type:
|
Full Usage:
get pattern handler ?configure
Parameters:
Pattern
handler : Func<'a, 'b>
?configure : RouteHandlerBuilder -> 'c
Returns: WebApplication
|
Extended Type:
|
Full Usage:
get pattern handler ?configure
Parameters:
Pattern
handler : Func<'a, 'b, 'c>
?configure : RouteHandlerBuilder -> 'd
Returns: WebApplication
|
Extended Type:
|
Full Usage:
get pattern handler ?configure
Parameters:
Pattern
handler : Func<'a, 'b, 'c, 'd>
?configure : RouteHandlerBuilder -> 'e
Returns: WebApplication
|
Extended Type:
|
Full Usage:
get pattern handler ?configure
Parameters:
Pattern
handler : Func<'a, 'b, 'c, 'd, 'e>
?configure : RouteHandlerBuilder -> 'f
Returns: WebApplication
|
Extended Type:
|
Full Usage:
get pattern handler ?configure
Parameters:
Pattern
handler : Func<'a, 'b, 'c, 'd, 'e, 'f>
?configure : RouteHandlerBuilder -> 'g
Returns: WebApplication
|
Extended Type:
|
Full Usage:
get pattern handler ?configure
Parameters:
Pattern
handler : Func<'a, 'b, 'c, 'd, 'e, 'f, 'g>
?configure : RouteHandlerBuilder -> 'h
Returns: WebApplication
|
Extended Type:
|
Full Usage:
get pattern handler ?configure
Parameters:
Pattern
handler : Func<'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h>
?configure : RouteHandlerBuilder -> 'i
Returns: WebApplication
|
Extended Type:
|
Full Usage:
get pattern handler ?configure
Parameters:
Pattern
handler : Func<'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, 'i>
?configure : RouteHandlerBuilder -> 'j
Returns: WebApplication
|
Extended Type:
|
Full Usage:
get pattern handler ?configure
Parameters:
Pattern
handler : Func<'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, 'i, 'j>
?configure : RouteHandlerBuilder -> 'k
Returns: WebApplication
|
Extended Type:
|
Full Usage:
get pattern handler ?configure
Parameters:
Pattern
handler : Func<'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, 'i, 'j, 'k>
?configure : RouteHandlerBuilder -> 'l
Returns: WebApplication
|
Extended Type:
|
Full Usage:
get pattern handler ?configure
Parameters:
Pattern
handler : Func<'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, 'i, 'j, 'k, 'l>
?configure : RouteHandlerBuilder -> 'm
Returns: WebApplication
|
Extended Type:
|
Full Usage:
get pattern handler ?configure
Parameters:
Pattern
handler : Func<'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, 'i, 'j, 'k, 'l, 'm>
?configure : RouteHandlerBuilder -> 'n
Returns: WebApplication
|
Extended Type:
|
Full Usage:
get pattern handler ?configure
Parameters:
Pattern
handler : Func<'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, 'i, 'j, 'k, 'l, 'm, 'n>
?configure : RouteHandlerBuilder -> 'o
Returns: WebApplication
|
Extended Type:
|
Full Usage:
get pattern handler ?configure
Parameters:
Pattern
handler : Func<'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, 'i, 'j, 'k, 'l, 'm, 'n, 'o>
?configure : RouteHandlerBuilder -> 'p
Returns: WebApplication
|
Extended Type:
|
Full Usage:
get pattern handler ?configure
Parameters:
Pattern
handler : Func<'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, 'i, 'j, 'k, 'l, 'm, 'n, 'o, 'p>
?configure : RouteHandlerBuilder -> 'q
Returns: WebApplication
|
Extended Type:
|
Full Usage:
get pattern handler ?configure
Parameters:
Pattern
handler : Func<'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, 'i, 'j, 'k, 'l, 'm, 'n, 'o, 'p, 'q>
?configure : RouteHandlerBuilder -> 'r
Returns: WebApplication
|
Extended Type:
|
Full Usage:
get pattern produces handler ?configure
Parameters:
Pattern
produces : (int * Type) list
handler : Func<'a, 'b>
?configure : RouteHandlerBuilder -> 'c
Returns: WebApplication
|
Extended Type:
|
Full Usage:
get pattern produces handler ?configure
Parameters:
Pattern
produces : (int * Type) list
handler : Func<'a, 'b, 'c>
?configure : RouteHandlerBuilder -> 'd
Returns: WebApplication
|
Extended Type:
|
Full Usage:
get pattern produces handler ?configure
Parameters:
Pattern
produces : (int * Type) list
handler : Func<'a, 'b, 'c, 'd>
?configure : RouteHandlerBuilder -> 'e
Returns: WebApplication
|
Extended Type:
|
Full Usage:
get pattern produces handler ?configure
Parameters:
Pattern
produces : (int * Type) list
handler : Func<'a, 'b, 'c, 'd, 'e>
?configure : RouteHandlerBuilder -> 'f
Returns: WebApplication
|
Extended Type:
|
Full Usage:
get pattern produces handler ?configure
Parameters:
Pattern
produces : (int * Type) list
handler : Func<'a, 'b, 'c, 'd, 'e, 'f>
?configure : RouteHandlerBuilder -> 'g
Returns: WebApplication
|
Extended Type:
|
Full Usage:
get pattern produces handler ?configure
Parameters:
Pattern
produces : (int * Type) list
handler : Func<'a, 'b, 'c, 'd, 'e, 'f, 'g>
?configure : RouteHandlerBuilder -> 'h
Returns: WebApplication
|
Extended Type:
|
Full Usage:
get pattern produces handler ?configure
Parameters:
Pattern
produces : (int * Type) list
handler : Func<'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h>
?configure : RouteHandlerBuilder -> 'i
Returns: WebApplication
|
Extended Type:
|
Full Usage:
get pattern produces handler ?configure
Parameters:
Pattern
produces : (int * Type) list
handler : Func<'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, 'i>
?configure : RouteHandlerBuilder -> 'j
Returns: WebApplication
|
Extended Type:
|
Full Usage:
get pattern produces handler ?configure
Parameters:
Pattern
produces : (int * Type) list
handler : Func<'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, 'i, 'j>
?configure : RouteHandlerBuilder -> 'k
Returns: WebApplication
|
Extended Type:
|
Full Usage:
get pattern produces handler ?configure
Parameters:
Pattern
produces : (int * Type) list
handler : Func<'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, 'i, 'j, 'k>
?configure : RouteHandlerBuilder -> 'l
Returns: WebApplication
|
Extended Type:
|
Full Usage:
get pattern produces handler ?configure
Parameters:
Pattern
produces : (int * Type) list
handler : Func<'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, 'i, 'j, 'k, 'l>
?configure : RouteHandlerBuilder -> 'm
Returns: WebApplication
|
Extended Type:
|
Full Usage:
get pattern produces handler ?configure
Parameters:
Pattern
produces : (int * Type) list
handler : Func<'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, 'i, 'j, 'k, 'l, 'm>
?configure : RouteHandlerBuilder -> 'n
Returns: WebApplication
|
Extended Type:
|
Full Usage:
get pattern produces handler ?configure
Parameters:
Pattern
produces : (int * Type) list
handler : Func<'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, 'i, 'j, 'k, 'l, 'm, 'n>
?configure : RouteHandlerBuilder -> 'o
Returns: WebApplication
|
Extended Type:
|
Full Usage:
get pattern produces handler ?configure
Parameters:
Pattern
produces : (int * Type) list
handler : Func<'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, 'i, 'j, 'k, 'l, 'm, 'n, 'o>
?configure : RouteHandlerBuilder -> 'p
Returns: WebApplication
|
Extended Type:
|
Full Usage:
get pattern produces handler ?configure
Parameters:
Pattern
produces : (int * Type) list
handler : Func<'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, 'i, 'j, 'k, 'l, 'm, 'n, 'o, 'p>
?configure : RouteHandlerBuilder -> 'q
Returns: WebApplication
|
Extended Type:
|
Full Usage:
get pattern produces handler ?configure
Parameters:
Pattern
produces : (int * Type) list
handler : Func<'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, 'i, 'j, 'k, 'l, 'm, 'n, 'o, 'p, 'q>
?configure : RouteHandlerBuilder -> 'r
Returns: WebApplication
|
Extended Type:
|