I'm using httpclient to make api call but when using async the class can only be void so I am trying to figure out how to return a value to my Controller and back to the view.
public async void GetResult(){
using(var httpClient = new HttpClient()){
var httpResponse = await httpClient.GetAsync(requestMessage);
var responseContent = await httpResponse.Content.ReadAsStringAsync();
}
}
Now that I have the responseContent(value) I want to return it to my controller but every time I try to remove the void it says async only works with void.