httpread

package
v1.4.8 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2017 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadFullyJSON

func ReadFullyJSON(f func() (*http.Response, error), v interface{}) error

ReadFullyJSON reads a http response into a data container using a json decoder. The response is checked for its status code and the http.Response.Body is closed.

func ReadFullyString

func ReadFullyString(f func() (*http.Response, error)) (string, error)

ReadFullyString reads a http response into a string. The response is checked for its status code and the http.Response.Body is closed.

func ReadFullyXML

func ReadFullyXML(f func() (*http.Response, error), v interface{}) error

ReadFullyXML reads a http response into a data container using an XML decoder. The response is checked for its status code and the http.Response.Body is closed.

Types

type DecodeError

type DecodeError struct {
	// contains filtered or unexported fields
}

DecodeError represents an error related to unmarshalling.

type HTTPStatusCodeError

type HTTPStatusCodeError struct {
	// contains filtered or unexported fields
}

HTTPStatusCodeError represents an 4xx client or a 5xx server error.

Jump to

Keyboard shortcuts

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