http icon indicating copy to clipboard operation
http copied to clipboard

Make `StatusCode` implement `Serialize` and `Deserialize`

Open thomaseizinger opened this issue 5 years ago • 2 comments

It would be nice if the http crate would have a serde feature that makes things like StatusCode serializable.

I am currently in the progress of refactoring the http-api-problem crate to use the http crate and I cannot really continue because StatusCode is not serializable :(

thomaseizinger avatar Nov 04 '18 03:11 thomaseizinger

I've implemented this:

https://lib.rs/http-serde

kornelski avatar Feb 09 '20 17:02 kornelski

I wrote a crate that makes all serde types serializable (including Request/Response) as well as wrapping in Option and other std::collection types. https://crates.io/crates/http-serde-ext

andrewtoth avatar Oct 21 '23 23:10 andrewtoth