httpjson

package
v0.0.5-alpha Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

func Delete(url string, token string, insecureTLS bool) (map[string]interface{}, error)

Delete a delete request and get response as serialized json map[string]interface{}

func Get

func Get(url string, token string, insecureTLS bool) (map[string]interface{}, error)

Get a get request and get response as serialized json map[string]interface{}

func GetURLQuery

func GetURLQuery(queryParams interface{}) string

GetURLQuery converts a struct into a url query. The struct must have a tagname of 'query_key'

func Post

func Post(url string, token string, body interface{}, insecureTLS bool) (map[string]interface{}, error)

Post a post request and get response as serialized json map[string]interface{}

func Put

func Put(url string, token string, body interface{}, insecureTLS bool) (map[string]interface{}, error)

Put a put request and get response as serialized json map[string]interface{}

func SendRequest

func SendRequest(url string, method string, token string, body interface{}, insecureTLS bool) (map[string]interface{}, error)

SendRequest is an http request and get response as serialized json map[string]interface{}

func SendRequestRaw

func SendRequestRaw(url string, method string, token string, body interface{}, insecureTLS bool) ([]byte, error)

SendRequestRaw is an http request and get response as byte[]

Types

This section is empty.

Jump to

Keyboard shortcuts

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