I am assuming HTTPRequest.User and HTTPRequest.Password are for basic authentication and have tried setting them but it seems they are ignored.
I can add a header for Basic Authentication manually and it works fine.
So how can I base64 encode the credentials to add into the header?
I cannot find a function to use.
You can use TWebHTTPRequest.Headers to add header info and you can use the function atob() in web.pas to perform base64 encoding.
1119
(Шевяков Владислав)
May 1, 2020, 9:49am
3
Please, give an example Basic and JWT Authentication for TWebHttpRequest
1119
(Шевяков Владислав)
May 1, 2020, 10:31am
4
Please, give an example Basic Authentication for TWebHttpRequest
This all depends on the exact authentication flow your server expects.
If this is with another server and perhaps a different authentication flow, a starting point can be found here using basic HTTP that you could implement using the TWebHttpRequest in Pascal