xhttp

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Client

func Client() *resty.Client

Client returns a new resty.Client with some default configuration.

func Get

func Get(ctx context.Context, url string, v interface{}) error

Get sends a GET request to the specified URL and deserializes the response into v.

func Post

func Post(ctx context.Context, url string, body interface{}, v interface{}) error

Post sends a POST request to the specified URL with the provided body and deserializes the response into v.

Types

type RestyLoggerAdapter

type RestyLoggerAdapter struct {
	zerolog.Logger
}

func (*RestyLoggerAdapter) Debugf

func (l *RestyLoggerAdapter) Debugf(format string, v ...interface{})

func (*RestyLoggerAdapter) Errorf

func (l *RestyLoggerAdapter) Errorf(format string, v ...interface{})

func (*RestyLoggerAdapter) Infof

func (l *RestyLoggerAdapter) Infof(format string, v ...interface{})

func (*RestyLoggerAdapter) Warnf

func (l *RestyLoggerAdapter) Warnf(format string, v ...interface{})

Jump to

Keyboard shortcuts

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