curl

package
v0.0.0-...-0046c35 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const AccessToken = "Access-Token"
View Source
const ApplicationFile = "multipart/form-data"
View Source
const ApplicationForm = "application/x-www-form-urlencoded;charset=utf-8"
View Source
const ApplicationJson = "application/json"
View Source
const ApplicationOctetStream = "application/octet-stream;charset=UTF-8"
View Source
const ApplicationXml = "application/xml;charset=utf-8"
View Source
const HttpTimeout = time.Duration(90 * time.Second)
View Source
const TlsTimeout = time.Duration(60 * time.Second)

Variables

View Source
var GET = defaultConfig.GET
View Source
var POST = defaultConfig.POST

Functions

func Web

func Web(httpUrl string, param map[string]string) string

Types

type Config

type Config struct {
	Headers map[string]string
}

func (*Config) DELETE

func (c *Config) DELETE(httpUrl string, param map[string]string) ([]byte, int, error)

func (*Config) GET

func (c *Config) GET(httpUrl string, param map[string]string) ([]byte, int, error)

func (Config) POST

func (c Config) POST(httpUrl string, reqBody []byte) ([]byte, int, error)

func (*Config) POSTFILE

func (c *Config) POSTFILE(httpUrl string, param map[string]string, file []byte) []byte

func (*Config) POSTJSON

func (c *Config) POSTJSON(httpUrl string, params []byte) ([]byte, http.Header, int)

func (Config) PUT

func (c Config) PUT(httpUrl string, reqBody []byte) ([]byte, int, error)

func (*Config) SetHeader

func (c *Config) SetHeader(k, v string)

Jump to

Keyboard shortcuts

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