httpclient

package
v0.8.11 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2014 License: BSD-2-Clause Imports: 8 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

func Delete(url string, header Header, data io.Reader) (resp *http.Response, err error)

func Do

func Do(t string, url string, header Header, data io.Reader) (*http.Response, error)

func Get

func Get(url string, header Header, data io.Reader) (resp *http.Response, err error)

func Post

func Post(url string, header Header, data io.Reader) (resp *http.Response, err error)

func Put

func Put(url string, header Header, data io.Reader) (resp *http.Response, err error)

func SetBasicAuth

func SetBasicAuth(username, password string)

func SetTokenAuth

func SetTokenAuth(token string)

Types

type Auth

type Auth struct {
	Type     string
	Username string
	Password string
	Token    string
}

type Form

type Form struct {
	Length      int64
	Reader      io.Reader
	ContentType string
	// contains filtered or unexported fields
}

func NewForm

func NewForm() (f *Form)

func (*Form) AddFile

func (f *Form) AddFile(name, path string)

func (*Form) AddFileReader

func (f *Form) AddFileReader(name string, r io.Reader, size int64)

func (*Form) AddParam

func (f *Form) AddParam(key, val string)

func (*Form) Create

func (f *Form) Create() (err error)

func (*Form) Dump

func (f *Form) Dump() (buf []byte)
type Header map[string]string

Jump to

Keyboard shortcuts

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