rest

package
v1.343.0 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: MIT Imports: 9 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

func Delete(path string, handler content.Handler)

Delete for rest.

func Error added in v1.328.0

func Error(response *resty.Response) error

Error will return an error if the response from the server is text (as server handlers return text on errors).

func Get

func Get(path string, handler content.Handler)

Get for rest.

func Head(path string, handler content.Handler)

Head for rest.

func NewClient added in v1.315.0

func NewClient(opts ...ClientOption) *resty.Client

NewClient for rest.

func Options added in v1.317.0

func Options(path string, handler content.Handler)

Options for rest.

func Patch added in v1.317.0

func Patch(path string, handler content.Handler)

Patch for rest.

func Post

func Post(path string, handler content.Handler)

Post for rest.

func Put

func Put(path string, handler content.Handler)

Put for rest.

func Register

func Register(mu *http.ServeMux, ct *content.Content)

Register for rpc.

func Route

func Route(path string, handler content.Handler)

Route for rest.

Types

type ClientOption added in v1.315.0

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

ClientOption for rest.

func WithClientRoundTripper added in v1.315.0

func WithClientRoundTripper(rt http.RoundTripper) ClientOption

WithSenderRoundTripper for rest.

func WithClientTimeout added in v1.315.0

func WithClientTimeout(timeout string) ClientOption

WithClientTimeout for rest.

Jump to

Keyboard shortcuts

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