rest

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(opts ...Option) ([]byte, error)

Get performs the GET request.

Types

type Option

type Option func(o *opts)

Option represents the option for the HTTP client.

func WithContentType

func WithContentType(contentType string) Option

WithContentType sets the content type header for the HTTP requests.

func WithTransport

func WithTransport(addr string) Option

WithTransport sets the preferred transport for the HTTP client.

func WithURI

func WithURI(uri string) Option

WithURI initializes the URI where the request is sent.

Jump to

Keyboard shortcuts

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