From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,81e499698343740e X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!postnews.google.com!w3g2000hsg.googlegroups.com!not-for-mail From: Adrian Hoe Newsgroups: comp.lang.ada Subject: Re: GNAT.Sockets: Authentication at HTTP Server Date: Thu, 13 Sep 2007 08:29:17 -0000 Organization: http://groups.google.com Message-ID: <1189672157.654035.194820@w3g2000hsg.googlegroups.com> References: <1189528985.876768.122400@57g2000hsv.googlegroups.com> <20070911200735.42f081e9.tero.koskinen@iki.fi> NNTP-Posting-Host: 124.13.20.155 Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Trace: posting.google.com 1189672157 31736 127.0.0.1 (13 Sep 2007 08:29:17 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 13 Sep 2007 08:29:17 +0000 (UTC) In-Reply-To: <20070911200735.42f081e9.tero.koskinen@iki.fi> User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en) AppleWebKit/419.3 (KHTML, like Gecko) Safari/419.3,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: w3g2000hsg.googlegroups.com; posting-host=124.13.20.155; posting-account=ps2QrAMAAAA6_jCuRt2JEIpn5Otqf_w0 Xref: g2news2.google.com comp.lang.ada:1939 Date: 2007-09-13T08:29:17+00:00 List-Id: On Sep 12, 1:07 am, Tero Koskinen 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.