Idris2Doc : Pact.WAI.Response

Pact.WAI.Response

(source)
Define response types and functions

Definitions

record Response : Type
Totality: total
Visibility: public export
Constructor: 
MkResponse : StatusCode -> Headers -> Maybe String -> Response

Projections:
.body : Response -> Maybe String
.headers : Response -> Headers
.status : Response -> StatusCode

Hint: 
Show Response
.status : Response -> StatusCode
Visibility: public export
status : Response -> StatusCode
Visibility: public export
.headers : Response -> Headers
Visibility: public export
headers : Response -> Headers
Visibility: public export
.body : Response -> Maybe String
Visibility: public export
body : Response -> Maybe String
Visibility: public export
notFoundResponse : Response
  404 Not Found response
Returned when the requested path cannot be matched to any route

Visibility: public export
badRequestResponse : String -> Response
  400 Bad Request response
Returned when the request is invalid

Visibility: public export
renderHeaders : Headers -> String
  Render headers to a string
@ headers The headers to render

Visibility: public export
renderResponse : Response -> String
  Response rendering function
Converts a Response to a string for HTTP response
@ resp The response object to render

Visibility: public export