request

package
v1.1.196 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

func Delete(url string, header et.Json) (*Body, Status)

* * Delete * @param url string, header et.Json * @return *Body, Status *

func DeleteWithTls added in v1.1.123

func DeleteWithTls(url string, header et.Json, tlsConfig *tls.Config) (*Body, Status)

* * DeleteWithTls * @param url string, header et.Json, tlsConfig *tls.Config * @return *Body, Status *

func Get

func Get(url string, header et.Json) (*Body, Status)

* * Get * @param url string, header et.Json * @return *Body, Status *

func GetWithTls added in v1.1.123

func GetWithTls(url string, header et.Json, tlsConfig *tls.Config) (*Body, Status)

* * GetWithTls * @param url string, header et.Json, tlsConfig *tls.Config * @return *Body, Status *

func Http added in v1.1.123

func Http(method, url string, header, body et.Json, tlsConfig *tls.Config) (*Body, Status)

* * Http * @param method, url string, header, body et.Json * @return *Body, Status *

func NewTlsConfig added in v1.1.123

func NewTlsConfig(caFile, certFile, keyFile string) (*tls.Config, error)

* * NewTlsConfig * @param caPath, certPath, keyPath string * @return *tls.Config, error *

func Options

func Options(url string, header et.Json) (*Body, Status)

* * Options * @param url string, header et.Json * @return *Body, Status *

func OptionsWithTls added in v1.1.123

func OptionsWithTls(url string, header et.Json, tlsConfig *tls.Config) (*Body, Status)

* * OptionsWithTls * @param url string, header et.Json, tlsConfig *tls.Config * @return *Body, Status *

func Patch

func Patch(url string, header, body et.Json) (*Body, Status)

* * Patch * @param url string, header, body et.Json * @return *Body, Status *

func PatchWithTls added in v1.1.123

func PatchWithTls(url string, header, body et.Json, tlsConfig *tls.Config) (*Body, Status)

* * PatchWithCA * @param url string, header, body et.Json, tlsConfig *tls.Config * @return *Body, Status *

func Post

func Post(url string, header, body et.Json) (*Body, Status)

* * Post * @param url string, header, body et.Json * @return *Body, Status *

func PostWithTls added in v1.1.123

func PostWithTls(url string, header, body et.Json, tlsConfig *tls.Config) (*Body, Status)

* * PostWithTls * @param url string, header, body et.Json, tlsConfig *tls.Config * @return *Body, Status *

func Put

func Put(url string, header, body et.Json) (*Body, Status)

* * Put * @param url string, header, body et.Json * @return *Body, Status *

func PutWithTls added in v1.1.123

func PutWithTls(url string, header, body et.Json, tlsConfig *tls.Config) (*Body, Status)

* * PutWithTls * @param url string, header, body et.Json, tlsConfig *tls.Config * @return *Body, Status *

Types

type Body

type Body struct {
	Data []byte
}

* * Body struct to convert the body response *

func ReadBody

func ReadBody(body io.ReadCloser) (*Body, error)

* * ReadBody reads the body response * @param body io.ReadCloser * @return *Body, error *

func (Body) ToArrayJson

func (b Body) ToArrayJson() ([]et.Json, error)

* * ToArrayJson returns a Json array object * @return []et.Json *

func (Body) ToBool

func (b Body) ToBool() (bool, error)

* * ToBool returns a boolean * @return bool *

func (Body) ToFloat

func (b Body) ToFloat() (float64, error)

* * ToFloat returns a float * @return float64 *

func (Body) ToInt

func (b Body) ToInt() (int, error)

* * ToInt returns an integer * @return int *

func (Body) ToInt64

func (b Body) ToInt64() (int64, error)

* * ToInt64 returns an integer * @return int64 *

func (Body) ToItem added in v1.1.183

func (b Body) ToItem() (et.Item, error)

* * ToItem returns a Item object * @return et.Item *

func (Body) ToItems added in v1.1.183

func (b Body) ToItems() (et.Items, error)

* * ToItems returns a Items object * @return et.Items *

func (Body) ToJson

func (b Body) ToJson() (et.Json, error)

* * ToJson returns a Json object * @return et.Json *

func (Body) ToString

func (b Body) ToString() string

* * ToString returns a string * @return string *

func (Body) ToTime

func (b Body) ToTime() (time.Time, error)

* * ToTime returns a time * @return time.Time *

type Status

type Status struct {
	Ok      bool   `json:"ok"`
	Code    int    `json:"code"`
	Message string `json:"message"`
}

func (Status) ToJson

func (s Status) ToJson() et.Json

ToJson returns a Json object

func (Status) ToString

func (s Status) ToString() string

ToString returns a string

Jump to

Keyboard shortcuts

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