hyperium / http

Rust HTTP types
Apache License 2.0
1.12k stars 283 forks source link

Add `from_string` for `HeaderName/HeaderValue` ? #590

Closed shenghui0779 closed 1 year ago

shenghui0779 commented 1 year ago

pub fn from_string(src: String) -> Result<HeaderValue, InvalidHeaderValue>

robjtede commented 1 year ago

https://docs.rs/http/latest/http/header/struct.HeaderValue.html#impl-FromStr-for-HeaderValue

src.parse::<HeaderValue>()