nickel-org / nickel.rs

An expressjs inspired web framework for Rust

Home Page:http://nickel-org.github.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Missing .head() method in Nickel::router()

imclint21 opened this issue · comments

Hi,

I try to create a REST API with Nickel, and I've some difficulties to implement head method.

Could you add router.head() to the Nickel Router ?

Thank you!

I don't see a reason for there not to be one. I guess no one has needed it before now. I'll add it shortly. In the meantime, you ought to be able to use this -

  router.add_route(Method::Head, matcher, handler);
  • which is what the implementation will be.

Yes yes it works like this, but it can be good to add directly .head()

Thanks

Re-opening, to remind myself to implement his.

We have a PR - #447

And merged. I'm going to see if I can get anything else in this week, then push a new version to crate.io on Saturday.