Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeserializeHTTPRequest ¶ added in v0.19.2
DeserializeHTTPRequest create a new http.Request from a HTTPRequest
func ProxyError ¶
func ProxyError(w http.ResponseWriter, err error)
ProxyError log error and return a HTTP 526 error with the message
func ProxyErrorf ¶
func ProxyErrorf(w http.ResponseWriter, format string, args ...interface{})
ProxyErrorf log error and return a HTTP 526 error with the message
Types ¶
type HTTPRequest ¶
type HTTPRequest struct { Method string URL string Header map[string][]string ContentLength int64 WS bool Body []byte }
HTTPRequest is a serializable version of http.Request ( with only usefull fields )
func SerializeHTTPRequest ¶
func SerializeHTTPRequest(req *http.Request) (r *HTTPRequest)
SerializeHTTPRequest create a new HTTPRequest from a http.Request
type HTTPResponse ¶
HTTPResponse is a serializable version of http.Response ( with only useful fields )
func NewHTTPResponse ¶
func NewHTTPResponse() (r *HTTPResponse)
NewHTTPResponse creates a new HTTPResponse
func SerializeHTTPResponse ¶
func SerializeHTTPResponse(resp *httptest.ResponseRecorder) *HTTPResponse
SerializeHTTPResponse create a new HTTPResponse from a http.Response
Click to show internal directories.
Click to hide internal directories.