feat(server): add path() and query() to Request
Closes #896 Closes #897 BREAKING CHANGE: `RequestUri::AbsolutePath` variant is changed to a struct variant. Consider using `req.path()` or `req.query()` to get the relevant slice.
This commit is contained in:
		
				
					committed by
					
						 Sean McArthur
						Sean McArthur
					
				
			
			
				
	
			
			
			
						parent
						
							a228486a85
						
					
				
				
					commit
					8b3c120684
				
			| @@ -45,7 +45,7 @@ impl Echo { | ||||
| impl Handler<HttpStream> for Echo { | ||||
|     fn on_request(&mut self, req: Request<HttpStream>) -> Next { | ||||
|         match *req.uri() { | ||||
|             RequestUri::AbsolutePath(ref path) => match (req.method(), &path[..]) { | ||||
|             RequestUri::AbsolutePath { ref path, .. } => match (req.method(), &path[..]) { | ||||
|                 (&Get, "/") | (&Get, "/echo") => { | ||||
|                     info!("GET Index"); | ||||
|                     self.route = Route::Index; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user