httpjson

package
v1.0.2-release Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

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

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

func Get

func Get(identity bool, url string, token string, insecureTLS bool, logger logger.Logger) (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(identity bool, url string, token string, body interface{}, insecureTLS bool, logger logger.Logger) (map[string]interface{}, error)

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

func Put

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

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

func SendRequest

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

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

func SendRequestRaw

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

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

func SendRequestRawWithHeaders

func SendRequestRawWithHeaders(url, method string, headers http.Header, body interface{}, insecureTLS bool, logger logger.Logger) ([]byte, error)

SendRequestRawWithHeaders 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