httpx

package
v0.0.0-...-947bd7c Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2022 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(timeout time.Duration) *Client

func (*Client) Do

func (c *Client) Do(ctx context.Context, req *http.Request) (*http.Response, error)

Do executes configured presteps before Doing the request

type Doer

type Doer interface {
	Do(ctx context.Context, req *http.Request) (*http.Response, error)
}

type MockDoer

type MockDoer struct {
	mock.Mock
}

MockDoer is an autogenerated mock type for the Doer type

func NewMockDoer

func NewMockDoer(t mockConstructorTestingTNewMockDoer) *MockDoer

NewMockDoer creates a new instance of MockDoer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*MockDoer) Do

func (_m *MockDoer) Do(ctx context.Context, req *http.Request) (*http.Response, error)

Do provides a mock function with given fields: ctx, req

Jump to

Keyboard shortcuts

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