utils

package
v0.1.130 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2020 License: Apache-2.0 Imports: 14 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteRequest added in v0.1.126

func DeleteRequest(ctx context.Context, returnValuePointer interface{}, url string) errors.EdgeX

Helper method to make the delete request and return the body

func FromContext

func FromContext(ctx context.Context, key string) string

FromContext allows for the retrieval of the specified key's value from the supplied Context. If the value is not found, an empty string is returned.

func GetRequest

func GetRequest(ctx context.Context, returnValuePointer interface{}, baseUrl string, requestPath string, requestParams url.Values) errors.EdgeX

Helper method to make the get request and return the body

func PostByFileRequest added in v0.1.124

func PostByFileRequest(
	ctx context.Context,
	returnValuePointer interface{},
	url string,
	filePath string) errors.EdgeX

Helper method to make the post file request and return the body

func PostRequest added in v0.1.115

func PostRequest(
	ctx context.Context,
	returnValuePointer interface{},
	url string,
	data interface{}) errors.EdgeX

Helper method to make the post JSON request and return the body

func PutByFileRequest added in v0.1.124

func PutByFileRequest(
	ctx context.Context,
	returnValuePointer interface{},
	url string,
	filePath string) errors.EdgeX

Helper method to make the put file request and return the body

func PutRequest added in v0.1.123

func PutRequest(
	ctx context.Context,
	returnValuePointer interface{},
	url string,
	data interface{}) errors.EdgeX

Helper method to make the put JSON request and return the body

Types

This section is empty.

Jump to

Keyboard shortcuts

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