Hello,
I am attempting to send http request to a local server with paramteres:
WebHttpRequest1.Headers.AddPair('Access-Control-Allow-Origin', '*');
WebHttpRequest1.URL := 'http://localhost/flix/EANService/GetEans?EanCode=5055956189878';
WebHttpRequest1.Execute;
WebHttpRequest1.URL := 'http://localhost/flix/EANService/GetEans?EanCode=5055956189878';
WebHttpRequest1.Execute;
Upon execute I get an error on the webpage:
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://localhost/flix/EANService/GetEans?EanCode=5055956189878. (Reason: CORS header 'Access-Control-Allow-Origin' missing).
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://localhost/flix/EANService/GetEans?EanCode=5055956189878. (Reason: CORS request did not succeed).
uncaught exception: [object Object]
I can confim this URL request work OK with Postman
what am i missing?
Thank you for your assistance