I am using the below code to connect to my Cloud Card Server
hClient = New HttpClient As "hClient"
With hClient
.URL = urlRequested
.Auth = 1
.User = Global.PS_USER
.Password = Global.PS_PASS
.Async = False
.Timeout = 60
Select Case Methold
Case "GET"
.Get
Case "POST"
.Post("application/connect.v2+json", jsonString)
End Select
End With
I need to send over 2 addtion headers so I read online that I need to send them over as a string array so I set that up and added them as
Public HeaddersArray As New String[] '(I assume this is how I set up a String array)
HeaddersArray.Add("Software-House-ID: SD45T92", 0)
HeaddersArray.Add("Installer-Id: " & Global.InstallerID, 1)
So this would be my new code
hClient = New HttpClient As "hClient"
With hClient
.URL = urlRequested
.Auth = 1
.User = Global.PS_USER
.Password = Global.PS_PASS
.Head(HeaddersArray.Data)
.Async = False
.Timeout = 60
Select Case Methold
Case "GET"
.Get
Case "POST"
.Post("application/connect.v2+json", jsonString)
End Select
End With
but when I add them to the .Head function I get a error saying
Wanted String but got pointer instead
when I type .Head( the box underneath comes up and says "Headers as string[]])
I am totally stuck now how to send over the additional headers have i miss understood how to send the headers?
Anyone who can advise Please feel free to say or even if you can show me where I have gone wrong.