httprecorder

package
v0.0.0-...-b359386 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 15, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CompiledRequest

type CompiledRequest struct {
	Request struct {
		Method  string            `json:"method,omitempty"`
		URL     string            `json:"url,omitempty"`
		Headers map[string]string `json:"headers,omitempty"`
		Body    string            `json:"body,omitempty"`
	} `json:"request,omitempty"`
	Response struct {
		Headers map[string]string `json:"headers,omitempty"`
		Body    string            `json:"body,omitempty"`
	} `json:"response,omitempty"`
}

type Recorder

type Recorder struct {
	Client *http.Client
	// contains filtered or unexported fields
}

func NewWithClient

func NewWithClient(client *http.Client) *Recorder

func (*Recorder) GetRequests

func (r *Recorder) GetRequests() []*CompiledRequest

func (*Recorder) ResetClient

func (r *Recorder) ResetClient()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL