# HTTP Rest Server Error

**URL:** <https://forums.unrealengine.com/t/http-rest-server-error/561996>\
**Category:** Multiplayer & Networking\
**Tags:** Server, unreal-engine\
**Created:** [May 20, 2022, 1:35pm UTC](https://forums.unrealengine.com/t/http-rest-server-error/561996 "2022-05-20T13:35:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Feanor](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Feanor](https://forums.unrealengine.com/u/Feanor)\
**Post date:** [May 20, 2022, 1:35pm UTC](https://forums.unrealengine.com/t/http-rest-server-error/561996/1 "2022-05-20T13:35:21Z")

</div>

I’m trying to create an HTTP Rest server on Unreal engine with HTTPServer module.  
When I call the endpoint with localhost or 127.0.0.1 works fine, but when I use the machine IP i have an HTTP Error (Request timeout or Connection Refused).  
What could be the problem?

Thanks

```auto
void AServerGameMode::StartPlay()
{
	Super::StartPlay();

	auto HttpServerModule = &FHttpServerModule::Get();
	//UE_LOG(LogTemp, Log, TEXT("Starting UnrealHttpServer Server..."));
	TSharedPtr<IHttpRouter> HttpRouter = HttpServerModule->GetHttpRouter(Port);

	FHttpPath CommandPath(FEndpoint::SendCommand);
	FHttpRouteHandle HttpRouteHandle = HttpRouter->BindRoute(CommandPath, EHttpServerRequestVerbs::VERB_PUT,
		[this](const FHttpServerRequest& Request, const FHttpResultCallback& OnComplete)
		{
			return RequestMessageHandler(Request, OnComplete);
		}
	);

	// Start Listeners
	HttpServerModule->StartAllListeners();
}

```

---

<div class="post-metadata">

**Author:** ![Feanor](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Feanor](https://forums.unrealengine.com/u/Feanor)\
**Post date:** [May 20, 2022, 2:25pm UTC](https://forums.unrealengine.com/t/http-rest-server-error/561996/2 "2022-05-20T14:25:59Z")

</div>

I think I found the solution, I had to enter the following property inside the DefaultEngine.ini and Engine.ini:

[HTTPServer.Listeners]  
DefaultBindAddress=0.0.0.0

it would be interesting to understand how I would do it from code
