* GNAT.Sockets: Authentication at HTTP Server @ 2007-09-11 16:43 Adrian Hoe 2007-09-11 17:03 ` Pascal Obry 2007-09-11 17:07 ` Tero Koskinen 0 siblings, 2 replies; 4+ messages in thread From: Adrian Hoe @ 2007-09-11 16:43 UTC (permalink / raw) Hi, How do I connect to a HTTP server (a website) which requires authentication (Username, Password) with GNAT.Sockets? I have searched the entire C.L.A. but could not find any clues. Any ideas? Thanks in advance. -- Adrian Hoe http://adrianhoe.net ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: GNAT.Sockets: Authentication at HTTP Server 2007-09-11 16:43 GNAT.Sockets: Authentication at HTTP Server Adrian Hoe @ 2007-09-11 17:03 ` Pascal Obry 2007-09-11 17:07 ` Tero Koskinen 1 sibling, 0 replies; 4+ messages in thread From: Pascal Obry @ 2007-09-11 17:03 UTC (permalink / raw) To: Adrian Hoe Adrian Hoe a �crit : > How do I connect to a HTTP server (a website) which requires > authentication (Username, Password) with GNAT.Sockets? You can't. I mean GNAT.Sockets does not support HTTP. You can either directly read/write the HTTP protocol into the socket (see corresponding RFC) or use AWS (see AWS.Client) which does support Basic and Digest authentication. Pascal. -- --|------------------------------------------------------ --| Pascal Obry Team-Ada Member --| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE --|------------------------------------------------------ --| http://www.obry.net --| "The best way to travel is by means of imagination" --| --| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595 ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: GNAT.Sockets: Authentication at HTTP Server 2007-09-11 16:43 GNAT.Sockets: Authentication at HTTP Server Adrian Hoe 2007-09-11 17:03 ` Pascal Obry @ 2007-09-11 17:07 ` Tero Koskinen 2007-09-13 8:29 ` Adrian Hoe 1 sibling, 1 reply; 4+ messages in thread From: Tero Koskinen @ 2007-09-11 17:07 UTC (permalink / raw) On Tue, 11 Sep 2007 16:43:05 -0000 Adrian Hoe wrote: > Hi, > > How do I connect to a HTTP server (a website) which requires > authentication (Username, Password) with GNAT.Sockets? If you can use GPL/GMGPL code, look how AWS does it and take its client side code. AWS uses GNAT.Sockets for communication. AWS documentation at https://libre.adacore.com/aws/aws-gpl-2.3.0.html#Client-side gives following example: > If the Web page is protected and you must pass the request through an > authenticating proxy, the call will becomes: > > Data := Client.Get > (URL => "http://www.mydomain.net/protected/index.html" > User => "me", > Pwd => "mypwd", > Proxy => "192.168.67.1", > Proxy_User => "puser", > Proxy_Pwd => "ppwd"); Although, if a website uses some custom authentication method, then you probably need to play with HTML parsing, cookies, sessions, and stuff. -- Tero Koskinen - http://iki.fi/tero.koskinen/ ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: GNAT.Sockets: Authentication at HTTP Server 2007-09-11 17:07 ` Tero Koskinen @ 2007-09-13 8:29 ` Adrian Hoe 0 siblings, 0 replies; 4+ messages in thread From: Adrian Hoe @ 2007-09-13 8:29 UTC (permalink / raw) On Sep 12, 1:07 am, Tero Koskinen <tero.koski...@iki.fi> wrote: > On Tue, 11 Sep 2007 16:43:05 -0000 Adrian Hoe wrote: > > > Hi, > > > How do I connect to a HTTP server (a website) which requires > > authentication (Username, Password) with GNAT.Sockets? > > If you can use GPL/GMGPL code, look how AWS does it > and take its client side code. AWS uses GNAT.Sockets for > communication. > > AWS documentation athttps://libre.adacore.com/aws/aws-gpl-2.3.0.html#Client-side > gives following example: > > > If the Web page is protected and you must pass the request through an > > authenticating proxy, the call will becomes: > > > Data := Client.Get > > (URL => "http://www.mydomain.net/protected/index.html" > > User => "me", > > Pwd => "mypwd", > > Proxy => "192.168.67.1", > > Proxy_User => "puser", > > Proxy_Pwd => "ppwd"); > > Although, if a website uses some custom authentication method, then > you probably need to play with HTML parsing, cookies, sessions, > and stuff. > > -- > Tero Koskinen -http://iki.fi/tero.koskinen/ Thanks. I am able to connect with AWS.Client. ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-09-13 8:29 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2007-09-11 16:43 GNAT.Sockets: Authentication at HTTP Server Adrian Hoe 2007-09-11 17:03 ` Pascal Obry 2007-09-11 17:07 ` Tero Koskinen 2007-09-13 8:29 ` Adrian Hoe
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox