I'm trying to add HTTP requests to my game and everything compiles fine until I try to set up a delegate for when the response is ready. Adding this function causes the compiler to fail for syntax error identifier FHttpRequestPtr.


void OnSaveTokenResponse(FHttpRequestPtr Request, FHttpResponsePtr Response, bool bWasSuccessful);


void UGamejoltApi::OnSaveTokenResponse(FHttpRequestPtr Request, FHttpResponsePtr Response, bool bWasSuccessful)


I have both #include "Http.h" and #include "Interfaces/IHttpRequest.h". I also have this in my build file PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "HeadMountedDisplay", "HTTP" });.

  • \$\begingroup\$ Any help is greatly appreciated. I can't make the game without the ability to make some HTTP requests. \$\endgroup\$ Jan 5 '20 at 15:35

The solution was to move the #import "Http.h" to the header file. Then it compiles fine.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.