HI. I was following the following post: Best way to perform a http request? - Documentation Feedback - Unreal Engine Forums
IHttpRequest::ProcessRequest() is returning false. This signifies that the request is not being processed. Here is the chunk of code I am using:
FSagRequest CurrentRequest;
CurrentRequest.AddURLPair(param, value);
FString Dest;
Dest.Equals(“insertGameStats.php”);
CurrentRequest.SetDestination(Dest);
TSharedRef< IHttpRequest > Request = FHttpModule::Get().CreateRequest();
Request->SetVerb(“POST”);
Request->SetURL(TargetHost + CurrentRequest.TheDest); //target=“localhost”
Request->SetContentAsString(CurrentRequest.TheData);
Request->SetHeader("User-Agent", "XYZClient/1.0");
Request->SetHeader("Content-Type", "application/x-www-form-urlencoded");
Request->OnProcessRequestComplete().BindUObject(this, &AHTTPHandlerActor::OnResponseReceived);
if (!Request->ProcessRequest())
{
//ASagittarius::LogError("Unable to process HTTP Request!");
FString TestStringToBreak;
TestStringToBreak.Equals("dfsf");
}
The code breaks at the last line, which means that the request failed. This in turn calls void AHTTPHandlerActor::OnResponseReceived(FHttpRequestPtr Request, FHttpResponsePtr Response, bool bWasSuccessful) , with Response==null
Any help would be greatly appreciated.