0

I am trying to send custom header values in a HTTP POST but the site I am posting to tells me they are just receiving nulls.

I have tried setting the values OSName, OSVersion, ProductName, ProductVersion as a String, WideString and OLEVariant, but no matter how I send the values, they arrive as a null.

This is how they are being set. Yes I have verified that the values (OSName, etc) do have values.

HTTPOb := CoWinHttpRequest.Create; 
HTTPOb.SetTimeouts(RESOLVETIMEOUT,CONNECTTIMEOUT,SENDTIMEOUT,RECEIVETIMEOUT);

URL := sServer;
HTTPOb.Open(bStrMethod, URL, false);
HTTPOb.SetRequestHeader('MAXM_HOST_OS_NAME', OSName);
HTTPOb.SetRequestHeader('MAXM_HOST_OS_VER', OSVersion);
HTTPOb.SetRequestHeader('MAXM_HOST_APP_NAME', ProductName);
HTTPOb.SetRequestHeader('MAXM_HOST_APP_VER', ProductVersion);

HTTPOb.Send(xml);
Remy Lebeau
  • 555,201
  • 31
  • 458
  • 770
user3396999
  • 3
  • 1
  • 3

0 Answers0