fromBool : Bool -> Maybe ()- Visibility: export
interface Parsable : Type -> Type- Parameters: t
Methods:
parse : String -> Maybe t
Implementations:
Parsable Int Parsable Integer Parsable Nat Parsable String
parse : Parsable t => String -> Maybe t- Visibility: public export
interface Serializable : Type -> Type- Parameters: t
Methods:
toBuffer : t -> IO (Int, Buffer)
Implementations:
Serializable () Serializable String Serializable JSON
toBuffer : Serializable t => t -> IO (Int, Buffer)- Visibility: public export
interface Deserializable : Type -> Type- Parameters: t
Methods:
fromBuffer : Buffer -> Maybe t
Implementations:
Deserializable String Deserializable JSON
fromBuffer : Deserializable t => Buffer -> Maybe t- Visibility: public export
record NameTy : Type- Totality: total
Visibility: public export
Constructor: (:>) : String -> (ty : Type) -> Parsable ty => NameTy
Projections:
.name : NameTy -> String .p : ({rec:0} : NameTy) -> Parsable (ty {rec:0}) .ty : NameTy -> Type
.name : NameTy -> String- Visibility: public export
name : NameTy -> String- Visibility: public export
.ty : NameTy -> Type- Visibility: public export
ty : NameTy -> Type- Visibility: public export
.p : ({rec:0} : NameTy) -> Parsable (ty {rec:0})- Visibility: public export
Fixity Declaration: infixl operator, level 8 p : ({rec:0} : NameTy) -> Parsable (ty {rec:0})- Visibility: public export
Fixity Declaration: infixl operator, level 8 data ParsableQueryParam : Type- Totality: total
Visibility: public export
Constructors:
Nil : ParsableQueryParam (::) : NameTy -> ParsableQueryParam -> ParsableQueryParam
QueryType : ParsableQueryParam -> List Type- Visibility: public export
data ContentType : Type- Totality: total
Visibility: public export
Constructors:
JSON : ContentType Plain : ContentType PDF : ContentType
interface RequestParser : API -> Type- Parameters: c
Constructor: MkRequestParser
Methods:
parseReq : PlainRequest -> Either String (c .message) mkRes : (inp : c .message) -> c .response inp -> IO PlainResponse
parseReq : RequestParser c => PlainRequest -> Either String (c .message)- Visibility: public export
mkRes : RequestParser c => (inp : c .message) -> c .response inp -> IO PlainResponse- Visibility: public export
parseGeneric : ToJSON t => FromJSON argBody => (m : Method) -> (WFURL -> Maybe argURL) -> (argURL -> DepBody m argBody -> finalResult) -> JSONHTTP =&> Maybe (finalResult :- t) A helper to parse a GET request given a function that parses the URL and the request body
Visibility: exportparsePost : ToJSON t => FromJSON argBody => (WFURL -> Maybe argURL) -> (argURL -> argBody -> finalResult) -> JSONHTTP =&> Maybe (finalResult :- t) A helper to parse a GET request given a function that parses the URL and the body
Visibility: exportparsePost' : ToJSON t => FromJSON argBody => (WFURL -> Bool) -> JSONHTTP =&> Maybe (argBody :- t) A helper to parse a GET request given a function that matches the URL and parses the body from JSON
Visibility: exportparsePut : ToJSON t => FromJSON argBody => (WFURL -> Maybe argURL) -> (argURL -> argBody -> finalResult) -> JSONHTTP =&> Maybe (finalResult :- t) A helper to parse a GET request given a function that parses the URL and the body
Visibility: exportparsePut' : ToJSON t => FromJSON argBody => (WFURL -> Bool) -> JSONHTTP =&> Maybe (argBody :- t) A helper to parse a GET request given a function that matches the URL and parses the body from JSON
Visibility: exportparseDelete : ToJSON t => FromJSON argBody => (WFURL -> Maybe argURL) -> JSONHTTP =&> Maybe (argURL :- t) A helper to parse a GET request given a function that matches the URL and parses the body from JSON
Visibility: exportparseGet : ToJSON t => (WFURL -> Maybe arg) -> JSONHTTP =&> Maybe (arg :- t) A helper to parse a GET request given a function that parses the URL
Visibility: exportparseGet' : ToJSON t => FromJSON argBody => (WFURL -> Bool) -> JSONHTTP =&> Maybe (() :- t) A helper to parse a GET request given a function that matches on the URL
Visibility: exportrootPath : Path Root of the file system "/".
Visibility: exportisRoot : WFURL -> Bool- Visibility: export
parsePath : Path -> WFURL -> Bool- Visibility: export
asURL : PlainHTTP =&> Maybe RichHTTP parse the URL of an HTTP request into its own URL type for further analysis
Visibility: export Ensures a request has a specific header
Returns the request if it does, returns `Nothign` otherwise
Visibility: exporthasJSONBody : RichRequest Buffer -> Maybe (RichRequest JSON) Parse a request body as JSON, does not check for `content-type=application/json`
Visibility: exportparseJSONBody : FromJSON a => RichRequest Buffer -> Maybe (RichRequest a) Parse a request body as JSON, does not check for `content-type=application/json`
Visibility: exporthasJSONBodyContentType : RichRequest Buffer -> Maybe (RichRequest JSON) Parses a request body as JSON, checks for `content-type=application/json`
Visibility: export Convert the request body into JSON. Checks for content-type: application/json header
Visibility: export Convert all requests and responses are ones that manipulate JSON
Visibility: exporthttpJSONBody : PlainHTTP =&> Maybe JSONHTTP Return bad request if the request could not be parsed
Visibility: export Convert an execution for JSON-bodied requests to general HTTP requests
Visibility: exportasJSON : RichHTTP =&> Maybe JSONHTTP Convert the request body into a JSON value, do not check for content-type header
Visibility: exporthttpJSON : PlainHTTP =&> Maybe JSONHTTP Convert all requests and responses are ones that manipulate JSON, does not check for content-type header
Visibility: exporthttpJSONBody : PlainHTTP =&> Maybe JSONHTTP Return bad request if the request could not be parsed
Visibility: exportexecJSON : Costate (IO $- JSONHTTP) -> Costate (IO $- PlainHTTP) Convert an execution for JSON-bodied requests to general HTTP requests
Visibility: export0 GenHTTP : FromJSON a => ToJSON b => API- Visibility: public export
asJSON : {auto frjson : FromJSON a} -> {auto tojson : ToJSON b} -> RichHTTP =&> Maybe GenHTTP Convert the request body into a JSON value, do not check for content-type header
Visibility: exporthttpJSON : {auto frjson : FromJSON a} -> {auto tojson : ToJSON b} -> PlainHTTP =&> Maybe GenHTTP Convert all requests and responses are ones that manipulate JSON, does not check for content-type header
Visibility: exporthttpJSONBody : {auto frjson : FromJSON a} -> {auto tojson : ToJSON b} -> PlainHTTP =&> Maybe GenHTTP Return bad request if the request could not be parsed
Visibility: exportexecJSON : {auto frjson : FromJSON a} -> {auto tojson : ToJSON b} -> Costate (IO $- GenHTTP) -> Costate (IO $- PlainHTTP) Convert an execution for JSON-bodied requests to general HTTP requests
Visibility: export