johkoch: I assume that its a quite easy question for you but I need your help. I got a website where I want my future EA clients to but their AccountIDs for a license Check. When I call the API via Postman I get the data, however I am unable to adapt the Webrequest() function accordingly to get it to work, please help :) The API will return a JSON, that I want to parse lateron to check for the AccountIDs and if the Account is still valid. From my understanding / the documentation I dont need any includes
You have not explained the nature of the problem or issue you are having. You simply stated that you are "unable" but not what it is you are unable to do specifically.
Also, please remember that you have to give permission for the URL to be allowed access, in the Options:
Fernando Carreiro #:
You have not explained the nature of the problem or issue you are having. You simply stated that you are "unable" but not what it is you are unable to do specifically.
Also, please remember that you have to give permission for the URL to be allowed access, in the Options:
You are right, sorry for that. 🙏😁
When compiling the code i get an error it says:
'WebRequest' - no one of the overloads can be applied to the function call
could be one of 2 function(s)
built-in: int WebRequest(const string,const string,const string,const string,int,const char&[],int,char&[],string&)
built-in: int WebRequest(const string,const string,const string,int,const char&[],char&[],string&)
johkoch #: You are right, sorry for that. 🙏😁 When compiling the code i get an error it says: 'WebRequest' - no one of the overloads can be applied to the function call
Untested code to serve only as an example ...
void OnStart() { string url = "https://URL/wp-json/mp/v1/members/10", // URL would be my Domain name headers = "Authorization: Bearer XYZ", //XYZ would be my API Key result_headers; char data[] = {}, result[]; int request = WebRequest( "GET", url, headers, 5000, data, result, result_headers ); if( request == 200 ) { // Success string result_string = CharArrayToString( result, 0, WHOLE_ARRAY, CP_UTF8 ); Print( "API call successful. Response: ", result_string ); // Parse the response data here } else { // Error Print( "API call failed. Error code: ", request ); }; };
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hello Folks,
I assume that its a quite easy question for you but I need your help.
I got a website where I want my future EA clients to but their AccountIDs for a license Check.
When I call the API via Postman I get the data, however I am unable to adapt the Webrequest() function accordingly to get it to work, please help :)
The API will return a JSON, that I want to parse lateron to check for the AccountIDs and if the Account is still valid
From my understanding / the documentation I dont need any includes
Thank you very much!