Commit graph

15 commits

Author SHA1 Message Date
Simon Cruanes
de23d9b2a3
wip: add IO.Writer.t, a push based stream
This is more convenient than our existing streams when it comes to
writing a body. The user can just get an output channel and write to it,
flush it, etc. as they please. This should also simplify compression…
once it works.
2023-07-11 10:57:08 -04:00
Simon Cruanes
832c4bd4df
more docs 2023-07-11 10:01:39 -04:00
Simon Cruanes
ec2f2f6f2e
add Server.run_exn 2023-07-11 10:01:33 -04:00
Simon Cruanes
b9faebffe4 use a resource pool to recycle buffers 2023-06-23 17:58:11 -04:00
Simon Cruanes
79cbcca4c1
cleanup: remove unused function in Tiny_httpd_server.IO_BACKEND 2023-06-21 00:23:11 -04:00
Simon Cruanes
5d7637becc
server: add IO_BACKEND abstraction; implement a unix version of it
this doesn't change the `create`+`run` version, but makes it possible to
create a server that doesn't use unix IOs.
2023-06-20 23:03:31 -04:00
Simon Cruanes
ac17e61a81
prepare for 0.13 2023-05-24 16:14:13 -04:00
Simon Cruanes
202ef14f59
doc 2023-05-24 15:42:32 -04:00
Simon Cruanes
aa27963c5a
improve docs 2023-05-24 15:39:05 -04:00
Simon Cruanes
88bfb9c109
feat: Server.run takes ?after_init parameter
also use it in http_of_dir to print the actual port.
2023-05-24 15:38:38 -04:00
Simon Cruanes
0908d71e19
ocamlformat 2023-05-23 17:40:18 -04:00
Simon Cruanes
997f7aa868
expose Response.make_void
it only has no body if the http code is compatible with it.
close #62
2023-05-23 17:18:05 -04:00
Stephane Legrand
9c2cf0900d Add OPTIONS method 2023-05-07 20:55:46 -04:00
Simon Cruanes
91e835ea60
docstrings 2022-03-30 12:55:03 -04:00
Simon Cruanes
d5f9eacc81 split code into more modules 2022-03-16 20:40:38 -04:00