issue with Wininet for https request in mql4
Hello to anyone visiting this in future,
I solved the issue by using another DLL Function ShellExecuteW from Shell32.dll
#import "shell32.dll" int ShellExecuteW(int hwnd, string lpOperation, string lpFile, string lpParameters, string lpDirectory, int nShowCmd); #import string batchFilePath = "C:\\Windows\\System32\\curl.exe"; string req = "-X DELETE https://www.demo.com -H \"header\""; int result = ShellExecuteW(0, "open", batchFilePath, req, "", 0);
Can anyone please point out what is wrong with my code, the MSDN error shows 0, I am using mock endpoint to try to see if the code works but it does not register the request when the code is executed, I have tried using port 443 for https with 0x00800000 flag for HTTPS in HttpsOpenRequestA but still does not show on the endpoint. using simple curl command sends a request while this code does not.
curl -X DELETE https://hehehe.free.beeceptor.com/I tried using kernel32 winexec with above code but it return code 2 and does not send request to endpoint.
I would really appreciate any help Thank you!