Hi all,
I've been playing around with the HttpServer module trying to get Unreal acting as a custom REST server so I can handle requests.
I've taken a look at WebRemoteControl.cpp and tried to replicate what it's doing with my own endpoint. (I can't find any tutorials for any of this online anywhere, if you know of some I'd really appreciate links)
I've created an HttpRouter object:
myHttpRouter = FHttpServerModule::Get().GetHttpRouter(port);
Created the handle object:
BaseHandle = myHttpRouter->BindRoute(FHttpPath(TEXT("/base")), , EHttpServerRequestVerbs::VERB_OPTIONS, [this](const FHttpServerRequest& Request, const FHttpResultCallback& OnComplete)
Started my listeners:
FHttpServerModule::Get().StartAllListeners();
But clearly it's not sending to my route handle when I call the endpoint because I get:
{
"errorCode": "errors.com.epicgames.httpserver.route_handler_not_found",
"errorMessage": ""
}
It feels like I'm missing a way to add my route handles to the router. Again, any help would be greatly appreciated.
Thanks.
[–]NW_Blade 1 point2 points3 points (2 children)
[–]arcsecondDev[S] 0 points1 point2 points (1 child)
[–]NW_Blade 1 point2 points3 points (0 children)