httpx

package
v0.0.0-...-c436d6b Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DoUnmarshalJSONResponse

func DoUnmarshalJSONResponse(client Client, request *http.Request, response any) error

func NewPostFormRequest

func NewPostFormRequest(ctx context.Context, endpoint string, values url.Values) (*http.Request, error)

func StatusError

func StatusError(resp *http.Response) error

Types

type Client

type Client interface {
	Do(req *http.Request) (*http.Response, error)
}

Client is an interface for an http.Client from the standard library that allows us to more easily extend and/or mock out the existing http client from the standard library.

Jump to

Keyboard shortcuts

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