🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.web
Article #613

Re: Calling a web-service from behind a proxy server

#613
From: Remy Lebeau (TeamB)
Date: Fri, 19 May 2006 20:34
41 lines
2063 bytes
"Borland Lover" <kdhf@kbdf.com> wrote in message
news:446e1cd9$1@newsgroups.borland.com...

> I have had one developer tell me that my application that calls a
> web-service should "just work" from behind a proxy server.  Is this true?

Only if the application's code takes the proxy into account.  Otherwise no.

> if (globalOptions.UseProxy)
> {
>     IdHTTP1->Request->ProxyServer = globalOptions.ProxyName;
>     IdHTTP1->Request->ProxyPort = globalOptions.ProxyPort;
>
>     if (globalOptions.UseProxyAuth)
>     {
>         IdHTTP1->Request->ProxyUsername = globalOptions.ProxyUserName;
>         IdHTTP1->Request->ProxyPassword = globalOptions.ProxyPassword;
>     }
> }

You need to use the ProxyParams property instead, ie:

    IdHTTP1->ProxyParams->Clear;

    if (globalOptions.UseProxy)
    {
        IdHTTP1->ProxyParams->ProxyServer = globalOptions.ProxyName;
        IdHTTP1->ProxyParams->ProxyPort = globalOptions.ProxyPort;

        if (globalOptions.UseProxyAuth)
        {
            IdHTTP1->ProxyParams->ProxyUsername =
globalOptions.ProxyUserName;
            IdHTTP1->ProxyParams->ProxyPassword =
globalOptions.ProxyPassword;
        }
    }


Gambit
Technical Details
Message-ID: <446e2c94$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <446e1cd9$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: feeec,1b56549fd55ca66e
X-Google-Attributes: gidfeeec,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com>
Newsgroups: borland.public.cppbuilder.internet.web
References: <446e1cd9$1@newsgroups.borland.com>
Subject: Re: Calling a web-service from behind a proxy server
Date: Fri, 19 May 2006 13:34:54 -0700
Lines: 43
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
NNTP-Posting-Host: 68.69.17.41
Message-ID: <446e2c94$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1148071060 68.69.17.41 (19 May 2006 13:37:40 -0700)
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail