http_client

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2025 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultHTTPClient

type DefaultHTTPClient struct{}

DefaultHTTPClient is the default implementation of HTTPClient.

func (*DefaultHTTPClient) Post

func (c *DefaultHTTPClient) Post(url, contentType string, body *bytes.Buffer) (*http.Response, error)

Post makes an HTTP POST request.

type HTTPClient

type HTTPClient interface {
	Post(url, contentType string, body *bytes.Buffer) (*http.Response, error)
}

HTTPClient is an interface for making HTTP requests.

func NewHTTPClient

func NewHTTPClient() HTTPClient

NewHTTPClient creates a new HTTPClient.

type MockHTTPClient

type MockHTTPClient struct {
	mock.Mock
}

MockHTTPClient is a mock implementation of HTTPClient.

func (*MockHTTPClient) Post

func (m *MockHTTPClient) Post(url, contentType string, body *bytes.Buffer) (*http.Response, error)

Post makes an HTTP POST request.

Jump to

Keyboard shortcuts

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