Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PrettyPrintHeaders ¶ added in v0.1.4
PrettyPrintHeaders formats http.Header into a human-readable string.
func SaveNetworkTraffic ¶ added in v0.1.4
func SaveNetworkTraffic(req *http.Request, reqBody []byte, res *http.Response, resBody []byte) (e error)
SaveNetworkTraffic takes an http.Request, its body, http.Response, and response body, maps them to the NetworkTraffic model, and saves it to the database.
Types ¶
type ConnResponseWriter ¶
type ConnResponseWriter struct {
// contains filtered or unexported fields
}
ConnResponseWriter is our custom ResponseWriter that uses net.Conn.
func NewConnResponseWriter ¶
func NewConnResponseWriter(conn net.Conn) *ConnResponseWriter
NewConnResponseWriter creates a new instance of ConnResponseWriter.
func (*ConnResponseWriter) Header ¶
func (cw *ConnResponseWriter) Header() http.Header
Header returns the header map that will be sent by WriteHeader.
func (*ConnResponseWriter) Write ¶
func (cw *ConnResponseWriter) Write(data []byte) (int, error)
Write sends data to the client connection as part of an HTTP response.
func (*ConnResponseWriter) WriteHeader ¶
func (cw *ConnResponseWriter) WriteHeader(statusCode int)
WriteHeader writes the HTTP status code to the client.
Click to show internal directories.
Click to hide internal directories.