TwebclientConnection headers

The TwebclientConnection does not send the headers with the request.

I have a REST service that uses an ApiKey header for authentication.

I tried the same call using TWebHttpRequest. That sends the headers correctly.

Is there an easy fix for this?

I cannot see this happening. Do you use the latest version of TMS WEB Core?

I use the lastest version.

Did some more checking. It works if I add the headers in code before opening the dataset.

The headers are:
kleyn-apikey:X-0999
referer:http://localhost:8000/Testweb/testweb.html
host:localhost:2001
user-agent:Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:69.0) Gecko/20100101 Firefox/69.0
connection:keep-alive
kleyn-sessionid:{03C92180-9CBE-43B0-ADE2-86817FA5A190}
accept:/
accept-encoding:gzip, deflate
accept-language:nl,en-US;q=0.7,en;q=0.3
origin:http://localhost:8000


If I select fetchfields on the webclientdataset the headers are not send.

The headers are:
authorization:Basic YmFydDp0ZXN0
host:localhost:2001
cache-control:no-cache
user-agent:TMSWEB

The kleyn-apikey and kleyn-sessionid headers were already added to the headers property.

Also on fetchfields I get a popup for the user en password. Those are not relevant for this REST service. Maybe add an option to disable this?

Do I understand correct that your problem report is about design-time behavior specifically?

That is correct.

We have improved the design-time behavior to use the headers set in the connection.
The next update will have this improvement.

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.