Using HttpClient sub in a DLL. But the calling app wants to get a True or False as a return that the HttpClient worked.
So I tried to write a simple calling app like so
Public Function SendBasket() As Integer
Try
SendMarketBasket()
If MktResp = "Loaded" Then
Return 0
ElseIf MktResp = "Nothing to Load" Then
Return -1
End If
Catch ex As Exception
Return -1
End Try
End Function
Private Async Sub SendMarketBasket()........
Obviously the If statement after the call to the Async call runs immediately before the MktResp is set. How can I return the function result only after the Async call completes?
TIA Harry