janet-lang / spork

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

Add chance to set the HTTP status in httpf #156

Closed pepe closed 4 months ago

pepe commented 11 months 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 10 months 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 10 months ago

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