seanmonstar / httparse

A push parser for the HTTP 1.x protocol in Rust.
https://docs.rs/httparse
Apache License 2.0
573 stars 113 forks source link

How get a header value easily ? #62

Closed fdubois1 closed 2 years ago

fdubois1 commented 4 years ago

Hi,

It is not an issue, but more a question. There is no function to easily search/find a header in the header array. Is it because the need was not there it has not been done by anybody or is it because I missed something that could help me to do a such job ?

Same thing with the method. It returns you an Option<&Str>, but could be useful to know quickly if it is a GET, a POST...

For now, I wrote function on my side to help me, but I'm wondering if it could be useful in the crate itself. Thanks