apirequest

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2019 License: NCSA Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Timeout int64 = 10
)

Variables

View Source
var Identity = ""

Functions

func Delete

func Delete(url string, data interface{}) (int, error)

Executes an API DELETE request and populates the data with the response

func Do

func Do(req *http.Request, data interface{}) (int, error)

Executes an API request and populates the data with the response

func Get

func Get(url string, data interface{}) (int, error)

Executes an API GET request and populates the data with the response

func Post

func Post(url string, payload interface{}, data interface{}) (int, error)

Executes an API POST request and populates the data with the response

func Put

func Put(url string, payload interface{}, data interface{}) (int, error)

Executes an API PUT request and populates the data with the response

func SetIdentity

func SetIdentity(identity string)

Set the identity to place into HackIllinois-Identity when making requests

Types

This section is empty.

Jump to

Keyboard shortcuts

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