HttpRequest does not send data after Html5 launch

Hello,
i have a project where i would send a HttpRequest if i hit the play button. It will send a message to my node.js server and this would just take the message and log it on the console. This works fine if i start it from the browser. Now i want to launch this project in Html 5 and my server does not get any data.
This is my server index.js

var http = require('http');
var postHTML = 
  '<html><head><title>Post Example</title></head>' +
  '<body>' +
  '<form method="post">' +
  'Input 1: <input name="input1">  

’ +
'Input 2:
’ +
‘’ +
‘’ +
‘’;

http.createServer(function (req, res) {
  var body = "";
  req.on('data', function (chunk) {
	  console.log('data: ' + chunk);
    body += chunk;
  });
  req.on('end', function () {
    console.log('Posted: ' + body);
    res.writeHead(200);
    res.end(postHTML);
  });
}).listen(8080);

And this is how i send my HttpRequest

void AMyActor::ProcessRequest(const FString& Url)
{
        TSharedRef<IHttpRequest> HttpRequest = FHttpModule::Get().CreateRequest();
	FString TrimmedUrl = Url;
	TrimmedUrl.Trim();
	TrimmedUrl.TrimTrailing();

	HttpRequest->SetURL(TrimmedUrl);

	switch (RequestVerb)
	{
	case ERequestVerb::GET:
		HttpRequest->SetVerb(TEXT("GET"));
		break;

	case ERequestVerb::POST:
		HttpRequest->SetVerb(TEXT("POST"));
		break;

	case ERequestVerb::PUT:
		HttpRequest->SetVerb(TEXT("PUT"));
		break;

	case ERequestVerb::DEL:
		HttpRequest->SetVerb(TEXT("DELETE"));
		break;
	default:
		break;
	}

	// Set content-type
	switch (RequestContentType)
	{
	case ERequestContentType::json:
	{
		HttpRequest->SetHeader(TEXT("Content-Type"), TEXT("application/json"));

		HttpRequest->SetContentAsString(TEXT("test"));

		break;
	}

	default:
		break;
	}

	// Execute the request
	if (!HttpRequest->ProcessRequest()) {
		GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Red, TEXT("Problem processing the request "));
	}
	else {
		GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Red, TEXT("success"));
	}
}

The Verb is POST and the Url is http://localhost:8080/. As soon as i launch this on my browser (firefox 64 bit) i get the succes and it shows “Posted:” in the console. Am I missing something?

CORS security may be an issue, check out this earlier post: HTTP request don't run on HTML5 package - Platform & Builds - Epic Developer Community Forums. I wonder if that applies here?

Ok, now i got it to work with this code:

var http = require('http');
var express = require('express');
var cors = require('cors');
var app = express();
app.use(cors());
app.all('*', function(req, res, next) {
var origin = req.get('origin'); 
res.setHeader('Access-Control-Allow-Origin', '*');
res.setHeader('Access-Control-Request-Method', '*');
res.setHeader('Access-Control-Allow-Methods', '*');
res.setHeader('Access-Control-Allow-Headers', '*');
if(req.method == "GET")
{
    console.log("received GET request.")
}
else if(req.method == "POST")
     {
        console.log("received POST request.");
      }
    else
        {
             console.log("Undefined request .");
        }
		var body = "";
		req.on('data', function (chunk) {
			console.log('data: ' + chunk);
			body += chunk;
  });
  req.on('end', function () {
    console.log('POSTed: ' + body);
    res.writeHead(200);
    res.end('end');
  });
     next();
});
app.listen(8080);

Thanks for your help!