Documentation ¶
Index ¶
- func FromContext(ctx context.Context, key string) string
- func GetRequest(ctx context.Context, returnValuePointer interface{}, url string) errors.EdgeX
- func PostRawDataRequest(ctx context.Context, url string, data []byte) ([]byte, errors.EdgeX)
- func PostRequest(ctx context.Context, returnValuePointer interface{}, url string, ...) errors.EdgeX
- type CorrelatedRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 ¶
GetRequest will make a GET request to the specified URL, and parse the JSON-encoded response body to the value pointed to by returnValuePointer.
func PostRawDataRequest ¶ added in v0.1.115
PostRawDataRequest will make a POST request to the specified URL. It returns the body as a byte array if successful and an error otherwise.
Types ¶
type CorrelatedRequest ¶
type CorrelatedRequest struct {
}CorrelatedRequest is a wrapper type for use in managing Correlation IDs during service to service API calls.
func NewCorrelatedRequest ¶
func NewCorrelatedRequest(ctx context.Context, req *http.Request) CorrelatedRequest
NewCorrelatedRequest will add the Correlation ID header to the supplied request. If no Correlation ID header is present in the supplied context, one will be created along with a value.