Documentation ¶
Index ¶
- func Delete[Res any](path string, handler content.Handler[Res])
- func Error(response *resty.Response) error
- func Get[Res any](path string, handler content.Handler[Res])
- func NewClient(opts ...ClientOption) *resty.Client
- func Patch[Req any, Res any](path string, handler content.RequestHandler[Req, Res])
- func Post[Req any, Res any](path string, handler content.RequestHandler[Req, Res])
- func Put[Req any, Res any](path string, handler content.RequestHandler[Req, Res])
- func Register(mu *http.ServeMux, ct *content.Content)
- func Route[Res any](path string, handler content.Handler[Res])
- func RouteRequest[Req any, Res any](path string, handler content.RequestHandler[Req, Res])
- type ClientOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 NewClient ¶ added in v1.315.0
func NewClient(opts ...ClientOption) *resty.Client
NewClient for rest.
func Patch ¶ added in v1.317.0
func Patch[Req any, Res any](path string, handler content.RequestHandler[Req, Res])
Patch for rest.
func Post ¶
func Post[Req any, Res any](path string, handler content.RequestHandler[Req, Res])
Post for rest.
func Put ¶
func Put[Req any, Res any](path string, handler content.RequestHandler[Req, Res])
Put for rest.
func RouteRequest ¶ added in v1.346.0
func RouteRequest[Req any, Res any](path string, handler content.RequestHandler[Req, Res])
RouteRequest 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.
Click to show internal directories.
Click to hide internal directories.