Documentation
¶
Index ¶
- Variables
- type Init
- type Response
- func DeleteJSON[R any](ctx context.Context, url string, init Init) (Response[*R], error)
- func GetBytes(ctx context.Context, url string, init Init) (Response[[]byte], error)
- func GetJSON[R any](ctx context.Context, url string, init Init) (Response[*R], error)
- func PatchJSON[R any](ctx context.Context, url string, init Init) (Response[*R], error)
- func PostBytes(ctx context.Context, url string, init Init) (Response[[]byte], error)
- func PostJSON[R any](ctx context.Context, url string, init Init) (Response[*R], error)
- func PutJSON[R any](ctx context.Context, url string, init Init) (Response[*R], error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNilContext = errors.New("context cannot be nil") ErrEmptyURL = errors.New("URL cannot be empty") ErrInvalidResponse = errors.New("invalid response") ErrRequestFailed = errors.New("request failed") ErrInvalidTimeout = errors.New("timeout cannot be negative") ErrInvalidRetryCount = errors.New("retry count cannot be negative") ErrInvalidRetryWait = errors.New("retry wait cannot be negative") )
Common errors
Functions ¶
This section is empty.
Types ¶
Click to show internal directories.
Click to hide internal directories.