httpc

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: May 17, 2024 License: LGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MIMEApplicationJSON            = "application/json"
	MIMEApplicationJSONCharsetUTF8 = MIMEApplicationJSON + "; " + charsetUTF8
	MIMETextXML                    = "text/xml"
	MIMETextXMLCharsetUTF8         = MIMETextXML + "; " + charsetUTF8
	MIMETextHTML                   = "text/html"
	MIMETextHTMLCharsetUTF8        = MIMETextHTML + "; " + charsetUTF8
	MIMETextPlain                  = "text/plain"
	MIMETextPlainCharsetUTF8       = MIMETextPlain + "; " + charsetUTF8
	MIMEMultipartForm              = "multipart/form-data"
	MIMEOctetStream                = "application/octet-stream"

	HeaderContentType = "Content-Type"
)

Variables

This section is empty.

Functions

func DoRestfulRequest

func DoRestfulRequest(method, url string, body io.Reader, header map[string]string, bootstrap []string, timeout time.Duration) (respBytes []byte, err error)

func Get

func Get(url string, header H, bootstrap []string, timeout time.Duration) (respBytes []byte, err error)

func Post

func Post(url string, body io.Reader, header H, bootstrap []string, timeout time.Duration) (respBytes []byte, err error)

func PostJson

func PostJson(url string, data interface{}, bootstrap []string, timeout time.Duration) (respBytes []byte, err error)

Types

type H

type H map[string]string

Jump to

Keyboard shortcuts

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