HTTP Requests not being executed until function is finished

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

There was no way to make the HTTP request execute immediately.

So I just changed the design approach to accommodate allowing the result handler to call a blueprint at the end of processing the returned request.
The blueprint made it very easy to take in the desired information and continue working with it from that point.

This was actually really nice because it allowed my main thread to continue tasks without being held up waiting for the response.

Hello, can you share your code, I have same problem.