Documentation
¶
Index ¶
- func Delete(url string, header et.Json) (*Body, Status)
- func DeleteWithTls(url string, header et.Json, tlsConfig *tls.Config) (*Body, Status)
- func Get(url string, header et.Json) (*Body, Status)
- func GetWithTls(url string, header et.Json, tlsConfig *tls.Config) (*Body, Status)
- func Http(method, url string, header, body et.Json, tlsConfig *tls.Config) (*Body, Status)
- func NewTlsConfig(caFile, certFile, keyFile string) (*tls.Config, error)
- func Options(url string, header et.Json) (*Body, Status)
- func OptionsWithTls(url string, header et.Json, tlsConfig *tls.Config) (*Body, Status)
- func Patch(url string, header, body et.Json) (*Body, Status)
- func PatchWithTls(url string, header, body et.Json, tlsConfig *tls.Config) (*Body, Status)
- func Post(url string, header, body et.Json) (*Body, Status)
- func PostWithTls(url string, header, body et.Json, tlsConfig *tls.Config) (*Body, Status)
- func Put(url string, header, body et.Json) (*Body, Status)
- func PutWithTls(url string, header, body et.Json, tlsConfig *tls.Config) (*Body, Status)
- type Body
- func (b Body) ToArrayJson() ([]et.Json, error)
- func (b Body) ToBool() (bool, error)
- func (b Body) ToFloat() (float64, error)
- func (b Body) ToInt() (int, error)
- func (b Body) ToInt64() (int64, error)
- func (b Body) ToItem() (et.Item, error)
- func (b Body) ToItems() (et.Items, error)
- func (b Body) ToJson() (et.Json, error)
- func (b Body) ToString() string
- func (b Body) ToTime() (time.Time, error)
- type Status
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteWithTls ¶ added in v1.1.123
* * DeleteWithTls * @param url string, header et.Json, tlsConfig *tls.Config * @return *Body, Status *
func GetWithTls ¶ added in v1.1.123
* * GetWithTls * @param url string, header et.Json, tlsConfig *tls.Config * @return *Body, Status *
func Http ¶ added in v1.1.123
* * Http * @param method, url string, header, body et.Json * @return *Body, Status *
func NewTlsConfig ¶ added in v1.1.123
* * NewTlsConfig * @param caPath, certPath, keyPath string * @return *tls.Config, error *
func OptionsWithTls ¶ added in v1.1.123
* * OptionsWithTls * @param url string, header et.Json, tlsConfig *tls.Config * @return *Body, Status *
func PatchWithTls ¶ added in v1.1.123
* * PatchWithCA * @param url string, header, body et.Json, tlsConfig *tls.Config * @return *Body, Status *
func PostWithTls ¶ added in v1.1.123
* * PostWithTls * @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 ¶
* * ToArrayJson returns a Json array object * @return []et.Json *