httpclient

package
v0.9.12 Latest Latest
Warning

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

Go to latest
Published: May 4, 2015 License: BSD-2-Clause Imports: 9 Imported by: 0 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

Overview

this package contains modified code based on following github repo: https://github.com/jaredwilkening/httpclient

this package contains modified code based on following github repo: https://github.com/jaredwilkening/httpclient

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

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

func Do

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

func Get

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

func Post

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

func Put

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

Types

type Auth

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

func GetUserByBasicAuth

func GetUserByBasicAuth(username, password string) (user *Auth)

func GetUserByTokenAuth

func GetUserByTokenAuth(token string) (user *Auth)

support multiple token types with datatoken backwards compatable, if no type given default to OAuth

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 http.Header

Jump to

Keyboard shortcuts

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