http

package
v0.0.0-...-f41bb3c Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2016 License: MIT Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ByteResponseBody

func ByteResponseBody(resp *http.Response) ([]byte, error)

func Delete

func Delete(url string, session string, data interface{}) (*http.Response, error)

func Get

func Get(url string, session string) (*http.Response, error)

func GetFile

func GetFile(url string, session string, filepath string) (*http.Response, error)

func HEAD_AUTH_KEY

func HEAD_AUTH_KEY() string

func Post

func Post(url string, session string, data interface{}) (*http.Response, error)

func PostFile

func PostFile(url string, session string, filepath string) (*http.Response, error)

func Put

func Put(url string, session string, data interface{}) (*http.Response, error)

func StringResponseBody

func StringResponseBody(resp *http.Response) (string, error)

Types

type HttpClient

type HttpClient struct {
	Header map[string]string
	// contains filtered or unexported fields
}

func NewHttpClient

func NewHttpClient() *HttpClient

func (*HttpClient) Clear

func (s *HttpClient) Clear()

func (*HttpClient) Delete

func (s *HttpClient) Delete(uri string, data interface{}) (*http.Response, error)

func (*HttpClient) Get

func (s *HttpClient) Get(uri string) (*http.Response, error)

func (*HttpClient) GetFile

func (s *HttpClient) GetFile(uri string, filepath string) (*http.Response, error)

func (*HttpClient) Post

func (s *HttpClient) Post(uri string, data interface{}) (*http.Response, error)

func (*HttpClient) PostFile

func (s *HttpClient) PostFile(uri string, filepath string) (*http.Response, error)

func (*HttpClient) PostForm

func (s *HttpClient) PostForm(uri string, data map[string]string) (*http.Response, error)

func (*HttpClient) Put

func (s *HttpClient) Put(uri string, data interface{}) (*http.Response, error)

func (*HttpClient) SetHeader

func (s *HttpClient) SetHeader(key, value string) *HttpClient

Jump to

Keyboard shortcuts

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