jsonhttp

package
v0.0.0-...-8472d0d Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2023 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BasicAuth

func BasicAuth(username, password string) string

func CreateAndExecuteJSONRequest

func CreateAndExecuteJSONRequest(processTitle string, method string, url string, body interface{}, headers map[string]string, timeoutInSeconds int, output interface{}) (string, *http.Response, error)

CreateAndExecuteJSONRequest will execute an HTTP request from json

func CreateRequest

func CreateRequest(method string, url string, body interface{}, headers map[string]string) (*http.Request, error)

CreateRequest Creates an http request with a json body representing the body object passed in

func ExecuteRequest

func ExecuteRequest(req *http.Request, output interface{}, timeoutInSeconds int) error

ExecuteRequest will execute the http request and unmarshal the response into the output object, output interface must be a &pointer

Types

This section is empty.

Jump to

Keyboard shortcuts

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