I had this code working in .Net Core. We realized Core wasn't the best fit for us right now, so I have been refactoring in .Net 4.5.2 and when I call
HttpResponseMessage response = await client.GetAsync(passedlURI);
It just continues thinking indefinitely. I have pointed it at a local host version of my API and confirmed that the API is reading the header and returning my data correctly, I have used Postman to confirm that both the live API and localhost API are sending me the correct data. Here is my code so far:

Make sure to use
.ConfigureAwait(false)with each of yourawait. Waiting synchronously on a task that internally awaits on the current synchronization context is a well-known cause of deadlocks in ASP.NET.For instance, instead of:
Do:
Of course, it would be even better if you didn't wait synchronously on a task to begin with.
The issue does not happen on ASP.NET Core because it doesn't use a custom synchronization context.