httpclient

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2023 License: MIT Imports: 4 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(baseURL string) *Client

NewClient returns a new custom HTTP client

func (*Client) Delete

func (c *Client) Delete(context context.Context, path string, headers http.Header) (*http.Response, error)

Delete perform a DELETE request using the given options

func (*Client) Generic

func (c *Client) Generic(context context.Context, method, path string, body io.Reader, headers http.Header) (*http.Response, error)

Generic perform a request using the given options

func (*Client) Get

func (c *Client) Get(context context.Context, path string, headers http.Header) (*http.Response, error)

Get perform a GET request using the given options

func (*Client) Patch

func (c *Client) Patch(context context.Context, path string, body io.Reader, headers http.Header) (*http.Response, error)

Patch perform a PATCH request using the given options

func (*Client) Post

func (c *Client) Post(context context.Context, path string, body io.Reader, headers http.Header) (*http.Response, error)

Post perform a POST request using the given options

func (*Client) Put

func (c *Client) Put(context context.Context, path string, body io.Reader, headers http.Header) (*http.Response, error)

Put perform a PUT request using the given options

Jump to

Keyboard shortcuts

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