Documentation ¶
Index ¶
Constants ¶
View Source
const ( POST = "POST" ContentType = "Content-Type" ApplicationJSON = "application/json" AuthorizationHeader = "Authorization" SignatureHeader = "X-Signature-256" )
Variables ¶
This section is empty.
Functions ¶
func DoRequestAndCatchUnsuccessful ¶
DoRequestAndCatchUnsuccessful sends a http request. If the response code != 200 then it returns an error.
func GenerateAuthenticatedPostRequest ¶
func GenerateAuthenticatedPostRequest(url, authToken, hash string, body []byte) (*http.Request, error)
GenerateAuthenticatedPostRequest creates a POST http.Request adding a token to the AuthorizationHeader header and hash to the SignatureHeader
func SignMessage ¶
SignMessage uses HMAC & SHA256 hashing to sign a message
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.