purescript-httpurple/Library/HTTPure/Status.purs
Connor Prussin 44df22e331 #22 add support for writing headers and status (#32)
* Add support for writing status code

* Add support for writing headers

* Code cleanup
2017-07-17 16:42:13 -07:00

18 lines
373 B
Haskell

module HTTPure.Status
( Status
, write
) where
import Prelude (Unit)
import Node.HTTP as HTTP
import HTTPure.HTTPureM as HTTPureM
-- | The Status type enumerates all valid HTTP response status codes.
type Status = Int
-- | Write a status to a given HTTP Response.
write :: forall e. HTTP.Response -> Status -> HTTPureM.HTTPureM e Unit
write = HTTP.setStatusCode