util

package
v0.0.0-...-c036721 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2018 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DoGet

func DoGet(c *http.Client, url string) (body []byte, e error)

DoGet is a wrapper around performing HTTP GET requests

func DoPost

func DoPost(c *http.Client, url string, contentType string, body io.Reader) (resp []byte, e error)

DoPost is a wrapper around performing HTTP POST requests

func GetAuthToken

func GetAuthToken() string

GetAuthToken gets the session token

func GetClient

func GetClient(verify bool) *http.Client

GetClient is a convenience function returning an http client

func SetAuthToken

func SetAuthToken() error

SetAuthToken sets the session token Requires that the config has been set up before calling

func Validate

func Validate(w http.ResponseWriter, r *http.Request) (err error)

Validate validates an http request

Types

This section is empty.

Jump to

Keyboard shortcuts

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