Problem connecting to API via HttpRequest
Created at 03 Oct 2023, 06:37
Problem connecting to API via HttpRequest
03 Oct 2023, 06:37
Hi
I would like to connect to a API but I am not getting the Token.
I have it working in Postman and have made the Headers the same in the cAlgo
The main issue would be I have no visibility to the methods behind the cTrader wrapper for HttpRequest.
The Headers have a problem getting set correctly.
How can I debug this further? Any pointers would be helpful.
stuart
07 Oct 2023, 08:45
Thank you to AKS on telegram for finding the issue :-)
There is a bug with HttpRequest where it does not set the Header “Content-Type”
So if you need it as part of the API call you can add a directive to httpd.conf (apache) to force all requests to have the header you need.
But its a bug that needs fixing..
@stuart