Jump to content
Sign in to follow this  

HTTP Before Send

Recommended Posts

Hi there, I'm playing with SmartMS with a REST based server (datasnap) which I am trying to communicate with authentication enabled.  The username and password attributes are encoded using base64 to  accomplish HTTP basic auth. So I need to add an HTTP header with the authentication information like:

beforeSend: function (sender){  
  sender.setRequestHeader('Authorization','Basic d2FybGV5YWxleDpnYWxv'));  




fHttp := TW3HttpRequest.Create; 
fHttp.SetRequestHeader("Authorization", "Basic d2FybGV5YWxleDpnYWxv"); 


--> doesn't work as expected


Any idea?



Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this