httpclient

package
v0.0.0-...-ed08d07 Latest Latest
Warning

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

Go to latest
Published: May 22, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

func Delete(url string, authHeader string) (int, []byte)

Delete sends a delete request to the given url

func DeleteWithHeaderInResult

func DeleteWithHeaderInResult(url string, authHeader string) (int, http.Header, []byte)

DeleteWithHeaderInResult sends a http delete request and return the response together with headers.

func Get

func Get(url string, authHeader string) (int, []byte)

Get sends a http get request to the url with the auth header.

func GetWithHeaderInResult

func GetWithHeaderInResult(url string, authHeader string) (int, http.Header, []byte)

GetWithHeaderInResult sends a http get request and return the response together with headers.

func Patch

func Patch(url string, requestBody []byte, requestHeaders map[string]string, authHeader string) (int, []byte, map[string][]string)

Patch sends a patch request to the url

func Post

func Post(url string, requestBody []byte, authHeader string) (int, []byte)

Post sends a http post request to the url with post body and auth header.

func PostMultipart

func PostMultipart(url string, files map[string][]byte, fields map[string][]byte, authHeader string) (int, []byte, map[string][]string)

PostMultipart sends a multi-part form post request to the url.

func PostRaw

func PostRaw(url string, requestBody []byte, contentType string, requestHeaders map[string]string, authHeader string) (int, []byte, map[string][]string)

PostRaw posts a raw byte array to server.

func PostWithHeaderResult

func PostWithHeaderResult(url string, requestBody []byte, authHeader string, headers map[string]string) (int, []byte, map[string][]string)

PostWithHeaderResult sends a http post request to the url with post body and auth header and get response together with response header.

func Put

func Put(url string, requestBody []byte, requestHeaders map[string]string, authHeader string) (int, []byte, map[string][]string)

Put sends a put request to the url

Types

This section is empty.

Jump to

Keyboard shortcuts

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