Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTTPRecorder ¶
type HTTPRecorder struct {
// contains filtered or unexported fields
}
func NewRecorder ¶
func NewRecorder(inner http.RoundTripper, log *RequestLog) *HTTPRecorder
type Request ¶
type Request struct {
Method string `json:"method,omitempty"`
URL string `json:"url,omitempty"`
Header http.Header `json:"header,omitempty"`
Body string `json:"body,omitempty"`
}
func (*Request) FormatHTTP ¶
type RequestLog ¶
type RequestLog struct {
Requests []Request
}
func (*RequestLog) FormatHTTP ¶
func (l *RequestLog) FormatHTTP() string
func (*RequestLog) FormatYAML ¶
func (l *RequestLog) FormatYAML() string
func (*RequestLog) RemoveHeader ¶
func (l *RequestLog) RemoveHeader(k string)
func (*RequestLog) RemoveUserAgent ¶
func (l *RequestLog) RemoveUserAgent()
func (*RequestLog) ReplaceURLPrefix ¶
func (l *RequestLog) ReplaceURLPrefix(old, new string)
Click to show internal directories.
Click to hide internal directories.