tokio-rs / tokio-minihttp

Protocol implementation experimentations
Apache License 2.0
448 stars 50 forks source link

Add custom status codes to responses #13

Closed atarola closed 7 years ago

alexcrichton commented 7 years ago

Thanks for the PR! Perhaps this could be a method Request::status_code(&mut self, u32, &str) -> &mut Request like other methods? We could add some helper constructors or some helper methods to set common statuses like ok/not found perhaps.

atarola commented 7 years ago

Sounds like a good idea to me. I'll update the PR when I get a chance.

alexcrichton commented 7 years ago

Thanks!