0

I try create a wrapper for HTTP calls as a Dynamic Library and I have come this far I am able to add Header and PostData, however, I need to add some special headers which look like this:

NetHTTPClient1.CustomHeaders['HeaderName1[HeaderName2]'] := 'HeaderValue';

I use this to add "regular" headers

NetHTTPClient1.CustomHeaders['HeaderName1'] := 'HeaderValue';

I use Delphi 10.4 CE on Windows 10 Pro x64...

Any thoughts / ideas / solutions are really appreciated .....

5
  • 1
    HeaderName1[HeaderName2] is not a legal HTTP header name. HTTP header names are defined as tokens, and the characters [ and ] are not allowed in tokens per RFCs 2616 and 7230. Why do you need this, exactly? Jun 7 at 17:15
  • I have this token (among others of same style) which needs to be sent ajax_page_state[theme]=pco_theme Jun 7 at 17:35
  • 1
    That is not an HTTP header, that needs to be passed in either the url query string or in the post body, depending on what the server is expecting. Jun 7 at 17:49
  • YAY .... what an IDIOT I am .................. :D Jun 7 at 19:44
  • @Remy-Lebeau I had switched POSTDATA and REQUESTHEADER in my TEST APP calling the DLL :( ........ Jun 7 at 20:01

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.