httpclient

package
v1.1.5 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func APIErrorHelper

func APIErrorHelper(req *http.Request, status int) error

APIErrorHelper formats an error message

func ConfigureCertVerification

func ConfigureCertVerification(skipVerify bool)

ConfigureCertVerification allows tls verification to be disabled

func CreateRequest

func CreateRequest(method string, uri string, payload []byte, token string) (*http.Request, error)

CreateRequest returns an http request with headers

func Request

func Request(method string, uri string, payload []byte, token string) ([]byte, error)

Request returns a response body and status code

func StatusValid

func StatusValid(status int) bool

StatusValid takes a status code, returns true if status is 200 or 201

Types

This section is empty.

Jump to

Keyboard shortcuts

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