-------------------------------------------------------------
GET /private/index.html HTTP/1.0
Host: localhost
Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
-------------------------------------------------------------
I think that this stuff is part of WinInet and Delphi SOAP Runtime is
independent from the communication method.
How can i append this header to my SOAP calls?
Thanks in Advance!!
Jair Karim
All you have to do is handle the OnBeforePost event on the
HTTPRIO.HTTPWebNode component and use InternetSetOption. Here's an example
from a sample that talks to MapPoint (MapPoint.NET uses 'digest'
authentication - a variant of 'basic' authentication):
procedure TTestMapPointRender.HTTPRIO1HTTPWebNode1BeforePost(
const HTTPReqResp: THTTPReqResp; Data: Pointer);
var
UserName: string;
PassWord: string;
begin
UserName := GetWSToken('MapPoint', 'UserName');
Password := GetWSToken('MapPoint', 'Password');
if not InternetSetOption(Data,
INTERNET_OPTION_USERNAME,
PChar(UserName),
Length(UserName)) then
raiseException(SysErrorMessage(GetLastError));
if not InternetSetOption(Data,
INTERNET_OPTION_PASSWORD,
PChar(Password),
Length (Password)) then
raiseException(SysErrorMessage(GetLastError));
end;
Cheers,
Bruneau.
With MapPoint.NET you can also do the following:
RenderServiceRequest := TdaHTTPRIO.Create(Self);
RenderServiceRequest.HTTPWebNode.UserName := Username;
RenderServiceRequest.HTTPWebNode.Password := Password;
Graham Harris
Thanks again!
Bruneau.
"Graham Harris" <n...@bmsgharr.globalnet.co.uk> wrote in message
news:7c6eb6621626e8...@newsgroups.borland.com...
Jair Karim
"Jean-Marie Babet" <bba...@borland.com> escribió en el mensaje de noticias
news:46043d94$1...@newsgroups.borland.com...