HTML5 HTTPRequest: OnProcessRequestComplete not called

I have run into some trouble with the HttpRequest->OnProcessRequestComplete function when I test my project in HTML5.

The PostRequest function works just fine (because the data is logged in the database table) but the RequestComplete function doesn’t seem to fire.

Everything works fine in the dekstop builds. (UE 4.7.4 - binary, emscripten 1.29.0)

Could this be a bug or am I missing something?

PostRequest Functionality

void UConnection::PostRequest(UObject* WorldContextObject)
{
	TSharedRef<IHttpRequest> HttpRequest = FHttpModule::Get().CreateRequest();

	HttpRequest->SetVerb(TEXT("POST"));
	HttpRequest->SetHeader(TEXT("Content-Type"), TEXT("application/json"));
	HttpRequest->SetURL("url");
	HttpRequest->SetContentAsString(TEXT("text"));

	HttpRequest->OnProcessRequestComplete().BindUObject(this, &UConnection::RequestComplete);

	HttpRequest->ProcessRequest();
}

RequestComplete Functionality

void UConnection::RequestComplete(FHttpRequestPtr Request, FHttpResponsePtr Response, bool bWasSuccessful)
{
	if (!bWasSuccessful)
	{
		UE_LOG(ConnectionLog, Error, TEXT("Request unsuccessful, check the url"));
		return;
	}

	Content = Response->GetContentAsString();

	UE_LOG(ConnectionLog, Log, TEXT("Content: %s"), *Content);
}

After looking a little more into this on the browser side it seemed to be a CORS issue.

Making a long story short I noticed I was visiting the project website trough it’s ‘naked’ domain (without the www in front). Though why not, this could maybe be the issue. Tried again, adding the ‘www’ in front of the address, and the response came trough.

So simply adding the ‘www’ in front of the url of the project website seemed to be the solution in this case.

Hi . I have got a similar error, you can see my error in HTTP request don't run on HTML5 package - Platform & Builds - Epic Developer Community Forums
I tryed to write the url with ‘www’ without result. :frowning:
Can I see your code, and the *.build.cs file?, or can you give me some ideas about this?
Thanks!!