Building an HttpServer Plugin

Howdy,

I’m looking to use the HttpServer module (Engine/Source/Runtime/Online/HttpServer) to build a REST server in Unreal in order to pass data that will execute my custom C++ functions.

Seeing as the HttpServer stuff seems to be relatively new I can’t find anything in the way of examples to build from. I’m mainly looking at the RemoteControl (Engine/Plugins/VirtualProduction/RemoteControl/Source) Plugins and trying to replicate what it’s doing but change the endpoints and their functions.

I have a StartServer command that makes an HttpRouter object and I seem to have called BindRoute for a couple of test endpoints but when I try them all I get is {“errorCode”: “errors.com.epicgames.httpserver.route_handler_not_found”, “errorMessage”: “”}

My current stopping point is it won’t find the includes:
#include “Backends/JsonStructDeserializerBackend.h”
#include “Backends/JsonStructSerializerBackend.h”
#include “StructSerializer.h”
#include “StructDeserializer.h”
#include “IStructSerializerBackend.h”

These appear to be necessary to build the structs to build the dispatcher? Am I going about this the right way?

But any other examples of a custom HttpServer would be appreciated.

Thanks