restcli

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(opt ...Options) *Client

func (*Client) Delete

func (thiz *Client) Delete(url string, params *Params, result ...any) (*resty.Response, error)

func (*Client) Get

func (thiz *Client) Get(url string, params *Params, result ...any) (*resty.Response, error)

func (*Client) Patch

func (thiz *Client) Patch(url string, params *Params, result ...any) (*resty.Response, error)

func (*Client) Post

func (thiz *Client) Post(url string, params *Params, result ...any) (*resty.Response, error)

func (*Client) Put

func (thiz *Client) Put(url string, params *Params, result ...any) (*resty.Response, error)

type Options

type Options struct {
	BaseUrl string
}

type Params

type Params struct {
	Header  map[string]string
	Queries map[string]string
	Body    any

	Formdata map[string]string
}

Jump to

Keyboard shortcuts

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