hClient not sending Headers to Remote server

Post

Posted
Rating:
#1 (In Topic #1228)
Enthusiast
AndyGable is in the usergroup ‘Enthusiast’
Hi Everyone,

I hope someone smart can help I though I had this fixed but when I spoke to my card processing company they told me no additional information is being sent to them in any requests

SO here what I am doing

I have declared Public HeaddersArray As New String[]  in my global module and when the program start I have a Module called "Main" and inside this is a Public sub called Main and the following code is run when it starts (as this is set to be the first file to be processed when the application starts up)

Code (gambas)

  1. Global.HeaddersArray.Add("Software-House-ID: SD45T92")
  2. Global.HeaddersArray.Add("Installer-Id: SD45T92")
  3.  

Also in my Global Module I have Public hClient As HttpClient ( the below code runs in inside the global Module),  when I send a Request to the Server I am using the following code

Code (gambas)

  1. global.buffer = Null
  2.     hClient = New HttpClient
  3.  
  4.     With hClient
  5.         .URL = urlRequested
  6.         .Auth = 1
  7.         .User = Global.PS_USER
  8.         .Password = Global.PS_PASS
  9.         .Async = False
  10.         .Timeout = 60
  11.         .Get(global.HeaddersArray)  <--- DOES nothing
  12.  
  13.         Select Case Methold
  14.             Case "GET"
  15.                 .Get
  16.        
  17.             Case "POST"
  18.                 .Post("application/connect.v2+json", jsonString)
  19.         End Select
  20.  
  21.     End With
  22.    
  23.     Return hClient
  24.  

What It should do is send in the header the extra 2 settings. It is logging me in to the Card Processing Server and performing all the functions it should do but I should be sending the extra data

am I doing this wrong?? I was following information I found on-line that said this was how to send the extra header information  (this was the post I was following) http://forum.gambas.one/viewtopic.php?t=1445

Any guidance, help or advise would be most welcomed.
Online now: No Back to the top
1 guest and 0 members have just viewed this.