httpreplay

package
v0.3.50 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExpectedCall

type ExpectedCall struct {
	Call           string
	ReqBodyJSONStr string
	Form           map[string]string
	ReqHeaders     map[string]string
	ResponseCode   int
	Response       string
}

type Transport

type Transport struct {
	T           testing.TB
	IncludeHost bool
	// contains filtered or unexported fields
}

func NewTransport

func NewTransport(t testing.TB, expectedCalls ...*ExpectedCall) *Transport

func (*Transport) Expect

func (tr *Transport) Expect(call *ExpectedCall)

func (*Transport) RoundTrip

func (tr *Transport) RoundTrip(r *http.Request) (*http.Response, error)

func (*Transport) Verify

func (tr *Transport) Verify()

Jump to

Keyboard shortcuts

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