mirror of
				https://github.com/labstack/echo.git
				synced 2025-10-30 23:57:38 +02:00 
			
		
		
		
	
							
								
								
									
										19
									
								
								context.go
									
									
									
									
									
								
							
							
						
						
									
										19
									
								
								context.go
									
									
									
									
									
								
							| @@ -1,6 +1,7 @@ | ||||
| package echo | ||||
|  | ||||
| import ( | ||||
| 	"bytes" | ||||
| 	"encoding/json" | ||||
| 	"encoding/xml" | ||||
| 	"fmt" | ||||
| @@ -16,8 +17,6 @@ import ( | ||||
| 	"time" | ||||
|  | ||||
| 	"golang.org/x/net/websocket" | ||||
|  | ||||
| 	"bytes" | ||||
| ) | ||||
|  | ||||
| type ( | ||||
| @@ -27,18 +26,12 @@ type ( | ||||
| 		// Request returns `*http.Request`. | ||||
| 		Request() *http.Request | ||||
|  | ||||
| 		// SetWebSocket sets `*http.Request`. | ||||
| 		// SetRequest sets `*http.Request`. | ||||
| 		SetRequest(*http.Request) | ||||
|  | ||||
| 		// Request returns `*Response`. | ||||
| 		Response() *Response | ||||
|  | ||||
| 		// WebSocket returns `*websocket.Conn`. | ||||
| 		WebSocket() *websocket.Conn | ||||
|  | ||||
| 		// SetWebSocket sets `*websocket.Conn`. | ||||
| 		SetWebSocket(*websocket.Conn) | ||||
|  | ||||
| 		// IsTLS returns true if HTTP connection is TLS otherwise false. | ||||
| 		IsTLS() bool | ||||
|  | ||||
| @@ -220,14 +213,6 @@ func (c *context) Response() *Response { | ||||
| 	return c.response | ||||
| } | ||||
|  | ||||
| func (c *context) WebSocket() *websocket.Conn { | ||||
| 	return c.webSocket | ||||
| } | ||||
|  | ||||
| func (c *context) SetWebSocket(ws *websocket.Conn) { | ||||
| 	c.webSocket = ws | ||||
| } | ||||
|  | ||||
| func (c *context) IsTLS() bool { | ||||
| 	return c.request.TLS != nil | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user