tests

package
v0.3.1-0...-f922a08 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2014 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

func Delete(url string, bodyType string, body io.Reader) (*http.Response, error)

func DeleteForm

func DeleteForm(url string, data url.Values) (*http.Response, error)

func Get

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

func NewHTTPClient

func NewHTTPClient() *http.Client

Creates a new HTTP client with KeepAlive disabled.

func Post

func Post(url string, bodyType string, body io.Reader) (*http.Response, error)

func PostForm

func PostForm(url string, data url.Values) (*http.Response, error)

func Put

func Put(url string, bodyType string, body io.Reader) (*http.Response, error)

func PutForm

func PutForm(url string, data url.Values) (*http.Response, error)

func ReadBody

func ReadBody(resp *http.Response) []byte

Reads the body from the response and closes it.

func ReadBodyJSON

func ReadBodyJSON(resp *http.Response) map[string]interface{}

Reads the body from the response and parses it as JSON.

func RunServer

func RunServer(f func(*server.Server))

Starts a server in a temporary directory.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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