http

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

func Delete(url string, contentType string, r io.Reader, w io.Writer) error

Delete perform a request using Request with the DELETE method

func Get

func Get(url string, contentType string, r io.Reader, w io.Writer) error

Get perform a request using Request with the GET method

func Post

func Post(url string, contentType string, r io.Reader, w io.Writer) error

Post perform a request using Request with the POST method

func Put

func Put(url string, contentType string, r io.Reader, w io.Writer) error

Put perform a request using Request with the PUT method

func Reason

func Reason(r *http.Response) (string, error)

Reason returns the reason phrase embedded within the JSON error body, or an error if no reason can be extracted

func Request

func Request(method string, url string, contentType string, r io.Reader, w io.Writer) error

Request will perform the request to the given url and method sending the content of the given reader as the body and writing all the contents of the response to the given writer. The reader and writer are optional.

Types

This section is empty.

Jump to

Keyboard shortcuts

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