janet-lang / spork

Various Janet utility modules - the official "Contrib" library.
MIT License
123 stars 35 forks source link

Add chance to set the HTTP status in httpf #156

Closed pepe closed 7 months ago

pepe commented 1 year ago

I already tried httpf on several projects and like the design choices. Yet, I am missing a chance to set the HTTP status code in the handler. Would you accept the PR with a mechanism similar to how response headers are set in the current version with a dynamic?

bakpakin commented 1 year ago

Yes, that would be reasonable if it becomes much easier to use. However, I think the request method is available in the parsed header (from spork/http.janet).

pepe commented 1 year ago

Thanks. I am unsure what you mean by the method's availability, but I will prepare PR for the HTTP status code ASAP.