httpClient

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2017 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client 对http client简单封装.

func NewClient

func NewClient(timeout time.Duration) Client

NewClient 创建一个带超时控制的http client.

func (Client) DELETE

func (c Client) DELETE(url string, headers map[string]string, body *bytes.Buffer) ([]byte, int, error)

DELETE delete 请求.

func (Client) Get

func (c Client) Get(url string, headers map[string]string, body *bytes.Buffer) ([]byte, int, error)

Get get 请求...

func (Client) POST

func (c Client) POST(url string, headers map[string]string, body *bytes.Buffer) ([]byte, int, error)

POST post 请求.

func (Client) PUT

func (c Client) PUT(url string, headers map[string]string, body *bytes.Buffer) ([]byte, int, error)

PUT put 请求.

Jump to

Keyboard shortcuts

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