1 year ago
#245055
Claus Fuss
'WithOAthBearerToken' is not a member of string
I'm using Flurl to connect to an API site, I need to do a Post and Put to create a new record and update, I have two different functions for each operation, this is one
Public Async Function CreateIdentityAsync(ByVal tok As String, ByVal accountId As String, ByVal model As IdentityModel) As Task(Of IdentityModel) Implements IIDentityService.CreateIdentityAsync
Return Await (_serviceUrl.WithOAuthBearerToken(tok).AppendPathSegment($"api/v1/accounts/{accountId}/identities").AllowAnyHttpStatus().PostJsonAsync(model)).As(Of IdentityModel)()
'Return Nothing
End Function
If I use Import Flurl
I get this error:
'WithOAthBearerToken' is not a member of string
and if I use Import Flurl.Http
I had this error:
'As'is not a member of 'Task(Of HttpResponseMessage)'.
Any idea of how can I fix it, and why is this happening?
vb.net
async-await
flurl
0 Answers
Your Answer