c-cube / tiny_httpd

Minimal HTTP server using good old threads + blocking IO, with a small request router.
https://c-cube.github.io/tiny_httpd
75 stars 11 forks source link

Pass status code to response makers #70

Closed vphantom closed 1 year ago

vphantom commented 1 year ago

In our application, we will use Ok() exclusively since we need to use the writer scheme and not a monolithic string in all cases. Therefore, we need to be able to pass the HTTP status code to the make function.

Note that this leaves the Error() case intact.

Also, ocamlformat crashes complaining that I need 0.24.1 while I run 0.26.0. I thought it would support multiple versions with that config setting but apparently it's just an assertion to avoid conflicts. So, I can't format and I did it manually as a best guess of what it should look like.