Hello.
I'm attempting to create a cloud script handler which communicates with an external HTTPS API. However when I make the request using the http.request API I am getting an internal error back from PlayFab (it looks like the request isn't making it as far as being sent out)
"result": { "responseContent": null, "httpStatus": null, "httpStatusCode": 0, "requestError": "InternalError" }, ... "Error": { "Error": "CloudScriptHTTPRequestError", "Message": "The script made an external HTTP request, which returned an error. See the Error logs for details.", "StackTrace": "Error\n at TestRequest (XXX-main.js:469:25)" }
The error seems to be related to the custom authorization header that the external API requires. If I remove the header altogether I get an unauthorised response back from the external API.
For reference, the API requires a custom Authorization header in the AWS Signature Version 4 format. An example of the header is as follows:
Authorization: AWS4-HMAC-SHA256 Credential=BKIAROSFODNN7EXAMPLE/20170913/eu-west-1/xf/aws4_request,SignedHeaders=host;range;x-amz-date,Signature=fe5f80f77d5fa3beca038a248ff027d0445342fe2855ddc963176630326f1024
I did some further debugging and noticed that it appears to be the semi-colons in the header which cause the problem, if they are removed then the request is sent (it returns a fail from the external service because the header is no longer valid, but gets past the InternalError).
Is this a bug in PlayFab perhaps or the underlying http library that you use (any implementation details that you could share to help us track down the issue?)