Download

HTML5 HttpRequest Failed

I need to fetch data from the server. But my code on a PC running well, to get to the data. On the HTML5 has failed. ProcessRequest returns TRUE, over a long time into the callback function, and the return value is empty.

Can someone help me? Thank you

TSharedRef HttpRequest = FHttpModule::Get ().CreateRequest ().;
HttpRequest->SetVerb(TEXT (“GET”));
HttpRequest->SetURL(TEXT (“http://www.google.com/”));
HttpRequest->OnProcessRequestComplete().BindObject(this, &AMyActor::Test_HttpRequestComplete);
HttpRequest->ProcessRequest();

UE4.6 Emscripten1.25.0

Your request needs to be to the same domain as where you downloaded the HTML5 app from. Most browsers block what is known as cross site scripting requests (CORS) because it is a security hole. If you need to do have cross site, then you’ll have to setup CORS for that app

Thank you for your reply.
I’m not familiar with html5 and javascript.
i need to do have cross site, how to write C ++ code?
Use CORS

I just searched on google
You mean my server needs to support CORS
UE generated html so you can access it?