http

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(url string, timeoutSeconds int64) (string, error)

Get 参考 https://www.cnblogs.com/zhaof/p/11346412.html?ivk_sa=1024320u 发送GET请求 url: 请求地址 response: 请求返回的内容 timeoutSeconds: 超时时间(秒)

func Post

func Post(url string, data interface{}, contentType string, timeoutSeconds int64) (string, error)

Post 发送POST请求 url: 请求地址 data: POST请求提交的数据 contentType: 请求体格式,如:application/json content: 请求放回的内容 timeoutSeconds: 超时时间(秒)

Types

This section is empty.

Jump to

Keyboard shortcuts

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