Back to godoc.org
go.etcd.io/etcd / tests

Package tests

v0.2.0
Latest Go to latest

The latest major version is .

Published: Dec 23, 2013 | License: Apache-2.0 | Module: go.etcd.io/etcd

Index

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.

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier