http

package
v0.0.29 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Do

func Do(
	method Method,
	target string,
	opts ...Option,
) ([]byte, error)

Types

type Config

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

type Method

type Method int64
const (
	GET Method = iota
	POST
)

func (Method) String

func (i Method) String() string

type Option

type Option interface {
	// contains filtered or unexported methods
}

func WithBody added in v0.0.20

func WithBody(body []byte) Option

func WithClient

func WithClient(client *http.Client) Option

func WithContext

func WithContext(ctx context.Context) Option

func WithHeader added in v0.0.20

func WithHeader(header map[string]string) Option

func WithLogger added in v0.0.17

func WithLogger(Logger log.Logger) Option

func WithQuery added in v0.0.20

func WithQuery(query map[string]string) Option

func WithRetry

func WithRetry(retry int) Option

func WithUniqueId added in v0.0.29

func WithUniqueId(uniqueId string) Option

Jump to

Keyboard shortcuts

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