util

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	InvalidUrlError = errors.New("invalid url")
)

Functions

This section is empty.

Types

type HttpRequest

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

func Request

func Request(urlComponents ...string) *HttpRequest

func (*HttpRequest) Accepting

func (r *HttpRequest) Accepting(mimeType string) *HttpRequest

func (*HttpRequest) Delete

func (r *HttpRequest) Delete() ([]byte, error)

func (*HttpRequest) DeleteContent

func (r *HttpRequest) DeleteContent(content []byte) ([]byte, error)

func (*HttpRequest) DeleteReturningJson

func (r *HttpRequest) DeleteReturningJson(o interface{}) error

func (*HttpRequest) Do

func (r *HttpRequest) Do(method string) ([]byte, error)

func (*HttpRequest) DoWithResponse

func (r *HttpRequest) DoWithResponse(method string) (*http.Response, error)

func (*HttpRequest) Get

func (r *HttpRequest) Get() ([]byte, error)

func (*HttpRequest) GetJson

func (r *HttpRequest) GetJson(o interface{}) error

func (*HttpRequest) IgnoringSsl

func (r *HttpRequest) IgnoringSsl(ignore bool) *HttpRequest

func (*HttpRequest) PostContent

func (r *HttpRequest) PostContent(content []byte) ([]byte, error)

func (*HttpRequest) Put

func (r *HttpRequest) Put() ([]byte, error)

func (*HttpRequest) Sending

func (r *HttpRequest) Sending(mimeType string) *HttpRequest

func (*HttpRequest) WithAuthorization

func (r *HttpRequest) WithAuthorization(authorization string) *HttpRequest

func (*HttpRequest) WithBearerToken

func (r *HttpRequest) WithBearerToken(authorization string) *HttpRequest

func (*HttpRequest) WithContent

func (r *HttpRequest) WithContent(content []byte) *HttpRequest

func (*HttpRequest) WithHeader

func (r *HttpRequest) WithHeader(key, value string) *HttpRequest

Jump to

Keyboard shortcuts

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