Documentation ¶
Overview ¶
Package packaging provides functions to convert to and from http.Request/Response and json marshallable equivalents.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func UnpackageHttpRequest ¶
func UnpackageHttpRequest(h *HttpRequest) (*http.Request, error)
func UnpackageHttpResponse ¶
Types ¶
type HttpRequest ¶
type HttpRequest struct { Method string `json:"method"` URL string `json:"url"` Host string `json:"host"` Path string `json:"path"` QueryString string `json:"query_string"` Scheme string `json:"scheme"` Body string `json:"body"` ID string `json:"id"` LocalID int64 `json:"local_id"` Headers []KeyValue `json:"headers"` Query []KeyValue `json:"query"` Tags []string `json:"tags"` Response *HttpResponse `json:"response"` }
func PackageHttpRequest ¶
type HttpResponse ¶
type HttpResponse struct { Body string `json:"body"` StatusCode int `json:"status_code"` ID string `json:"id"` LocalID int64 `json:"local_id"` Headers []KeyValue `json:"headers"` Tags []string `json:"tags"` BodySize int `json:"body_size"` Cookies []KeyValue `json:"cookies"` Request *HttpRequest `json:"request"` }
func PackageHttpResponse ¶
Click to show internal directories.
Click to hide internal directories.