resty

package
v1.5.7 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HttpDelete

func HttpDelete(url string, params any, opts ...RequestOption) ([]byte, error)

func HttpDeleteWith

func HttpDeleteWith[T RespData](url string, params any, opts ...RequestOption) (T, error)

func HttpGet

func HttpGet(url string, params map[string]string, opts ...RequestOption) ([]byte, error)

func HttpGetWith

func HttpGetWith[T RespData](url string, params map[string]string, opts ...RequestOption) (T, error)

func HttpPost

func HttpPost(url string, params any, opts ...RequestOption) ([]byte, error)

func HttpPostWith

func HttpPostWith[T RespData](url string, params any, opts ...RequestOption) (T, error)

func HttpPut

func HttpPut(url string, params any, opts ...RequestOption) ([]byte, error)

func HttpPutWith

func HttpPutWith[T RespData](url string, params any, opts ...RequestOption) (T, error)

Types

type RequestOption

type RequestOption struct {
	Token      string
	CaCertPath string
	Headers    map[string]string
}

type RespData

type RespData interface {
	any | map[string]any
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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