Skip to content

Commit

Permalink
handle HTTP HEAD
Browse files Browse the repository at this point in the history
  • Loading branch information
DeltaManiac committed Nov 8, 2018
1 parent 287acfc commit 013be3c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/router.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ impl<Data> Resource<Data> {
self.method(http::Method::GET, ep)
}

/// Add an endpoint for `HEAD` requests
pub fn head<T: Endpoint<Data, U>, U>(&mut self, ep: T) {
self.method(http::Method::HEAD, ep)
}

/// Add an endpoint for `PUT` requests
pub fn put<T: Endpoint<Data, U>, U>(&mut self, ep: T) {
self.method(http::Method::PUT, ep)
Expand Down

0 comments on commit 013be3c

Please sign in to comment.