rest

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InOut

func InOut[I, O, E any](ctx context.Context, client *http.Client, method, url string, header http.Header, in *I) (*O, error)

InOut performs REST request-response sequence. Input object 'in' of type 'I' is JSON serialized to request body. If there is no error, output object of type 'O' is JSON deserialized from response body and returned. If response's HTTP status code is not http.StatusOK, httphelper.Error is returned. httphelper.Error's Object of type 'E' is JSON deserialized from response body. Pass generichelper.NoType as corresponding type argument to skip processing of any object.

Types

This section is empty.

Jump to

Keyboard shortcuts

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