NetTalk Central

Author Topic: NetWebServiceMethod - setting CustomHeader for multiple values  (Read 3375 times)

Thys

  • Sr. Member
  • ****
  • Posts: 311
    • View Profile
    • Incasu
    • Email
Hi,

Just to make sure, when I setup multiple headers in a NetWebClient object, is the following correct?

net.CustomHeader = 'Content-Type: application/json<13><10>Authorization=1234'

Content-Type and Authorization being the two headers to set up.

Thys

DonRidley

  • Don Ridley
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 729
  • donaldridley2011@gmail.com
    • View Profile
    • Email
Re: NetWebServiceMethod - setting CustomHeader for multiple values
« Reply #1 on: July 16, 2019, 01:48:35 AM »
The NetWebClient has a specific method for the Content-Type header and I'm about 99% sure threre's one for the Authorization.   You could use <13,10> instead of <13><10>.  Overall, looks ok to me.

Don
"Eliminate the impossible, whatever remains, however unlikely, must be the truth."

NetTalk 12.55
Clarion 11

Thys

  • Sr. Member
  • ****
  • Posts: 311
    • View Profile
    • Incasu
    • Email
Re: NetWebServiceMethod - setting CustomHeader for multiple values
« Reply #2 on: July 16, 2019, 01:50:38 AM »
Thanks Don. I confirmed yesterday that it works correctly this way to add multiple header values.