0 | module Node.HTTP.ServerResponse
 1 |
 2 | import Data.Buffer
 3 | import public Node.Error
 4 | import public Node.HTTP.Headers
 5 | import public Node.Stream
 6 |
 7 | export
 8 | data ServerResponse : Type where [external]
 9 |
10 | public export
11 | implementation WriteableClass Buffer Error ServerResponse where
12 |
13 | %foreign "node:lambda: (res, status, headers) => res.writeHead(status, headers)"
14 | ffi_writeHead : ServerResponse -> Int -> Headers -> PrimIO ()
15 |
16 | export
17 | (.writeHead) : HasIO io => ServerResponse -> Int -> Headers -> io ()
18 | (.writeHead) res status headers = primIO $ ffi_writeHead res status headers
19 |
20 |