Documentation
¶
Index ¶
- Constants
- func Delete(url string, body []byte) (statusCode int, result []byte, err error)
- func DeleteWithClient(client *resty.Client, url string, body []byte) (statusCode int, result []byte, err error)
- func DeleteWithResult(url string, body []byte, result interface{}) (statusCode int, err error)
- func FormatHostWithIpAndPort(ip, port string) (string, error)
- func Get(url string) (int, []byte, error)
- func GetDefaultClient() *resty.Client
- func GetIPType(host string) (string, error)
- func GetIpAndPortFromHost(host string) (string, string, error)
- func GetWithClient(client *resty.Client, url string) (int, []byte, error)
- func GetWithResult(url string, result interface{}) (int, error)
- func Post(url string, body []byte) (statusCode int, result []byte, err error)
- func PostWithClient(client *resty.Client, url string, body []byte) (statusCode int, result []byte, err error)
- func PostWithResult(url string, body []byte, result interface{}) (statusCode int, err error)
- func Put(url string, body []byte) (statusCode int, result []byte, err error)
- func PutWithClient(client *resty.Client, url string, body []byte) (statusCode int, result []byte, err error)
- func PutWithResult(url string, body []byte, result interface{}) (statusCode int, err error)
Constants ¶
View Source
const ( // Ipv4_host_template Ipv4的host模板 Ipv4_host_template = "%s:%s" // Ipv6_host_template Ipv4的host模板 Ipv6_host_template = "[%s]:%s" )
Variables ¶
This section is empty.
Functions ¶
func DeleteWithClient ¶
func DeleteWithResult ¶
func FormatHostWithIpAndPort ¶
FormatHostWithIpAndPort 根据指定的ip和端口,格式化一个host(包含了ipv4和ipv6的类型)
func GetDefaultClient ¶
func GetIpAndPortFromHost ¶
GetIpAndPortFromHost 从一个包含了ip和端口的host中解析出ip和端口(没有端口的也可以解析,返回的端口为0)
func GetWithResult ¶
func PostWithClient ¶
func PostWithResult ¶
func PutWithClient ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.