I have to make connection to ConnectWise through API code.
In my windows application I used this code:
Dim client = New RestClient("https://website/v4_6_release/apis/3.0/time/entries?conditions=...]")
'Dim strB64Encoded As String = "companyid+publickey:privatekey"
Dim strB64Encoded As String = "forza+xxx:yyyy"
Dim base64Encoded As String = Convert.ToBase64String(System.Text.Encoding.ASCII.GetBytes(strB64Encoded))
client.Timeout = -1
Dim request = New RestSharp.RestRequest(Method.Get)
request.AddHeader("ClientID", "12345")
request.AddHeader("Authorization", "Basic " & base64Encoded)
Dim response As RestResponse = client.Execute(request)
Dim jsonDataSource = New JsonDataSource()
Dim json As String = response.Content
jsonDataSource.JsonSource = New CustomJsonSource(json)
jsonDataSource.Fill()
Now I have to create web application. And here I have some row with error. 'Execute' is not a member of 'RestClient' and Type 'JsonDataSource' is not defined in version 107.
Dim response As RestResponse = client.Execute(request)
Dim jsonDataSource = New JsonDataSource()
I use reference RestSharp. I need a help to resolve this problem.
Thanks