http

package
v1.20.1 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GET             = "GET"
	POST            = "POST"
	DELETE          = "DELETE"
	PUT             = "PUT"
	PATCH           = "PATCH"
	HEAD            = "HEAD"
	OPTIONS         = "OPTIONS"
	ContentTypeJSON = "application/json"
	ContentTypeForm = "application/x-www-form-urlencoded"
)

Variables

This section is empty.

Functions

func Delete

func Delete(url string) (b []byte, err error)

DELETE

func Get

func Get(url string) (b []byte, err error)

Get url res

func Post

func Post(url string, contentType string, body io.Reader) (b []byte, err error)

Post

Types

type Request

type Request struct {
	*http.Request
}

func NewRequest

func NewRequest(method, url string, body io.Reader) *Request

func (*Request) Do

func (r *Request) Do() (b []byte, err error)

Jump to

Keyboard shortcuts

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