I’m running UE 4.8.3 and am trying to get an image from an URL.
All in all, the code works for
- creating a request
- binding a response function to the request
- processing the returned content (the OnRequestCompleted function)
- Converting the returned content to a 2DTexture image
The problem I’m encountering is that the HTTP request is not fired off until the calling function has already completed and returned control to the game controller.
This doesn’t do me any good because the function that initiates the HTTP request needs to work with/apply the image once the request has finished.
I tried making the HTTP request portion a second thread, but the thread crashes at the “Create Request” line:
TSharedRef <IHttpRequest> Request = FHttpModule::Get().CreateRequest();
Is there a means to execute and process an HTTP request immediately?
This is pretty much the same issue as described in this question:
HttpRequest delayed processing