http

package
v0.0.1-beta.17 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRequest

func GetRequest(url string) (statusCode int32, body []byte, err error)

GetRequest 一个简单的 Get 请求

func PostFormRequest

func PostFormRequest(url string, json []byte, header, cookie map[string]string) (statusCode int32, body []byte, err error)

PostFormRequest 表单(x-www-form-urlencoded) 格式的 post 请求

func PostJsonRequest

func PostJsonRequest(url string, json []byte, header, cookie map[string]string) (statusCode int32, body []byte, err error)

PostJsonRequest json 格式的 post 请求

Types

type IPLocation

type IPLocation struct {
	IP        string
	Addr      string
	Longitude float64 // 经度
	Latitude  float64 // 纬度
}

func GetIPLocation

func GetIPLocation(ip string) (l *IPLocation, e error)

Jump to

Keyboard shortcuts

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