package utils
import "github.com/edgexfoundry/go-mod-core-contracts/v2/clients/http/utils"
Index ¶
- func DeleteRequest(ctx context.Context, returnValuePointer interface{}, baseUrl string, requestPath string) errors.EdgeX
- func FromContext(ctx context.Context, key string) string
- func GetRequest(ctx context.Context, returnValuePointer interface{}, baseUrl string, requestPath string, requestParams url.Values) errors.EdgeX
- func PatchRequest( ctx context.Context, returnValuePointer interface{}, url string, data interface{}) errors.EdgeX
- func PostByFileRequest( ctx context.Context, returnValuePointer interface{}, url string, filePath string) errors.EdgeX
- func PostRequest( ctx context.Context, returnValuePointer interface{}, url string, data interface{}) errors.EdgeX
- func PutByFileRequest( ctx context.Context, returnValuePointer interface{}, url string, filePath string) errors.EdgeX
- func PutRequest( ctx context.Context, returnValuePointer interface{}, url string, data interface{}) errors.EdgeX
Functions ¶
func DeleteRequest ¶
func DeleteRequest(ctx context.Context, returnValuePointer interface{}, baseUrl string, requestPath string) errors.EdgeX
Helper method to make the delete request and return the body
func FromContext ¶
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 PatchRequest ¶
func PatchRequest( ctx context.Context, returnValuePointer interface{}, url string, data interface{}) errors.EdgeX
PatchRequest makes a PATCH request and unmarshals the response to the returnValuePointer
func PostByFileRequest ¶
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 ¶
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 ¶
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 ¶
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
Source Files ¶
- Version
- v0.1.149 (latest)
- Published
- Jan 19, 2021
- Platform
- linux/amd64
- Imports
- 14 packages
- Last checked
- 5 days ago –
Tools for package owners.