http

package
v0.0.0-...-fc91ca8 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultClient = &Client{
		Client: http.DefaultClient,
	}

	ErrNonSuccessResponse = errors.New("non-2xx status code")
)

Functions

This section is empty.

Types

type Client

type Client struct {
	*http.Client
}

func (*Client) Do

func (c *Client) Do(req *Request) (*Response, error)

func (*Client) Get

func (c *Client) Get(ctx *dpcontext.Context, url string) (*Response, error)

type Request

type Request struct {
	*http.Request
}

func NewRequest

func NewRequest(ctx *dpcontext.Context, method, url string, body io.Reader) (*Request, error)

type Response

type Response struct {
	*http.Response
}

func Get

func Get(ctx *dpcontext.Context, url string) (*Response, error)

Jump to

Keyboard shortcuts

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