Idris2Doc : Stellar.HTTP.DSL

Stellar.HTTP.DSL

(source)

Reexports

importpublic Data.Buffer
importpublic Stellar.API.Maybe
importpublic JSON.Simple.Derive

Definitions

fromBool : Bool->Maybe ()
Visibility: export
interfaceParsable : Type->Type
Parameters: t
Methods:
parse : String->Maybet

Implementations:
ParsableInt
ParsableInteger
ParsableNat
ParsableString
parse : Parsablet=>String->Maybet
Visibility: public export
interfaceSerializable : Type->Type
Parameters: t
Methods:
toBuffer : t->IO (Int, Buffer)

Implementations:
Serializable ()
SerializableString
SerializableJSON
toBuffer : Serializablet=>t->IO (Int, Buffer)
Visibility: public export
interfaceDeserializable : Type->Type
Parameters: t
Methods:
fromBuffer : Buffer->Maybet

Implementations:
DeserializableString
DeserializableJSON
fromBuffer : Deserializablet=>Buffer->Maybet
Visibility: public export
recordNameTy : Type
Totality: total
Visibility: public export
Constructor: 
(:>) : String-> (ty : Type) ->Parsablety=>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
dataParsableQueryParam : Type
Totality: total
Visibility: public export
Constructors:
Nil : ParsableQueryParam
(::) : NameTy->ParsableQueryParam->ParsableQueryParam
QueryType : ParsableQueryParam->ListType
Visibility: public export
dataContentType : Type
Totality: total
Visibility: public export
Constructors:
JSON : ContentType
Plain : ContentType
PDF : ContentType
interfaceRequestParser : API->Type
Parameters: c
Constructor: 
MkRequestParser

Methods:
parseReq : PlainRequest->EitherString (c.message)
mkRes : (inp : c.message) ->c.responseinp->IOPlainResponse
parseReq : RequestParserc=>PlainRequest->EitherString (c.message)
Visibility: public export
mkRes : RequestParserc=> (inp : c.message) ->c.responseinp->IOPlainResponse
Visibility: public export
parseGeneric : ToJSONt=>FromJSONargBody=> (m : Method) -> (WFURL->MaybeargURL) -> (argURL->DepBodymargBody->finalResult) ->JSONHTTP=&>Maybe (finalResult:-t)
  A helper to parse a GET request given a function that parses the URL and the request body

Visibility: export
parsePost : ToJSONt=>FromJSONargBody=> (WFURL->MaybeargURL) -> (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: export
parsePost' : ToJSONt=>FromJSONargBody=> (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: export
parsePut : ToJSONt=>FromJSONargBody=> (WFURL->MaybeargURL) -> (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: export
parsePut' : ToJSONt=>FromJSONargBody=> (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: export
parseDelete : ToJSONt=>FromJSONargBody=> (WFURL->MaybeargURL) ->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: export
parseGet : ToJSONt=> (WFURL->Maybearg) ->JSONHTTP=&>Maybe (arg:-t)
  A helper to parse a GET request given a function that parses the URL

Visibility: export
parseGet' : ToJSONt=>FromJSONargBody=> (WFURL->Bool) ->JSONHTTP=&>Maybe (() :-t)
  A helper to parse a GET request given a function that matches on the URL

Visibility: export
rootPath : Path
  Root of the file system "/".

Visibility: export
isRoot : WFURL->Bool
Visibility: export
parsePath : Path->WFURL->Bool
Visibility: export
asURL : PlainHTTP=&>MaybeRichHTTP
  parse the URL of an HTTP request into its own URL type for further analysis

Visibility: export
hasHeader : (String, String) ->RichRequestb->Maybe (RichRequestb)
  Ensures a request has a specific header
Returns the request if it does, returns `Nothign` otherwise

Visibility: export
hasJSONBody : RichRequestBuffer->Maybe (RichRequestJSON)
  Parse a request body as JSON, does not check for `content-type=application/json`

Visibility: export
parseJSONBody : FromJSONa=>RichRequestBuffer->Maybe (RichRequesta)
  Parse a request body as JSON, does not check for `content-type=application/json`

Visibility: export
hasJSONBodyContentType : RichRequestBuffer->Maybe (RichRequestJSON)
  Parses a request body as JSON, checks for `content-type=application/json`

Visibility: export
asJSON : RichHTTP=&>MaybeJSONHTTP
  Convert the request body into JSON. Checks for content-type: application/json header

Visibility: export
httpJSON : PlainHTTP=&>MaybeJSONHTTP
  Convert all requests and responses are ones that manipulate JSON

Visibility: export
httpJSONBody : PlainHTTP=&>MaybeJSONHTTP
  Return bad request if the request could not be parsed

Visibility: export
execJSON : Costate (IO$-JSONHTTP) ->Costate (IO$-PlainHTTP)
  Convert an execution for JSON-bodied requests to general HTTP requests

Visibility: export
asJSON : RichHTTP=&>MaybeJSONHTTP
  Convert the request body into a JSON value, do not check for content-type header

Visibility: export
httpJSON : PlainHTTP=&>MaybeJSONHTTP
  Convert all requests and responses are ones that manipulate JSON, does not check for content-type header

Visibility: export
httpJSONBody : PlainHTTP=&>MaybeJSONHTTP
  Return bad request if the request could not be parsed

Visibility: export
execJSON : Costate (IO$-JSONHTTP) ->Costate (IO$-PlainHTTP)
  Convert an execution for JSON-bodied requests to general HTTP requests

Visibility: export
0GenHTTP : FromJSONa=>ToJSONb=>API
Visibility: public export
asJSON : {autofrjson : FromJSONa} -> {autotojson : ToJSONb} ->RichHTTP=&>MaybeGenHTTP
  Convert the request body into a JSON value, do not check for content-type header

Visibility: export
httpJSON : {autofrjson : FromJSONa} -> {autotojson : ToJSONb} ->PlainHTTP=&>MaybeGenHTTP
  Convert all requests and responses are ones that manipulate JSON, does not check for content-type header

Visibility: export
httpJSONBody : {autofrjson : FromJSONa} -> {autotojson : ToJSONb} ->PlainHTTP=&>MaybeGenHTTP
  Return bad request if the request could not be parsed

Visibility: export
execJSON : {autofrjson : FromJSONa} -> {autotojson : ToJSONb} ->Costate (IO$-GenHTTP) ->Costate (IO$-PlainHTTP)
  Convert an execution for JSON-bodied requests to general HTTP requests

Visibility: export