Thread View: borland.public.cppbuilder.internet.web
4 messages
4 total messages
Started by Hamid
Mon, 13 Mar 2006 07:40
URLEncode
Author: Hamid
Date: Mon, 13 Mar 2006 07:40
Date: Mon, 13 Mar 2006 07:40
2 lines
859 bytes
859 bytes
How can I encode a uri using a TIdURI class? The C++Builder version of the URLEncode function wants a Metaclass object that I can not understand what it is?
Re. URLEncode
Author: Elmar Baumann
Date: Mon, 13 Mar 2006 16:43
Date: Mon, 13 Mar 2006 16:43
42 lines
1745 bytes
1745 bytes
>Hamid wrote in Article <4415301a$1@newsgroups.borland.com>
>with Subject: URLEncode, on 13.03.2006 08:40:58
>
>
>
>How can I encode a uri using a TIdURI class? The C++Builder version of the URLEncode function wants a Metaclass object that I can not understand what it is?
Hello,
AnsiString url,WebUrl,html;
TMetaClass *cl;
TIdURI *uri;
WebUrl = "http://www.test.com"; // your url to encode
url = uri->URLEncode(cl,Weburl);
try
{
html = IdHTTP1->Get(url);
}
catch (Exception &exception)
{
// do something if an exception is raised
}
Best Regards
Elmar Baumann
------------------------------------------------------------------------------
Indy9 NNTP Internet News Reader/Writer, E. Baumann Software 2005
Portions of this Software are Copyright (c) 1993 - 2005,
Chad Z. Hower (Kudzu) and the Indy Pit Crew
<http://www.IndyProject.org/>
Re: URLEncode
Author: Remy Lebeau (TeamB)
Date: Mon, 13 Mar 2006 21:30
Date: Mon, 13 Mar 2006 21:30
14 lines
1277 bytes
1277 bytes
"Hamid" <hrz_mir@Yahoo.com> wrote in message
news:4415301a$1@newsgroups.borland.com...
> How can I encode a uri using a TIdURI class? The C++Builder
> version of the URLEncode function wants a Metaclass object that
> I can not understand what it is?
You need to use the __classid compiler keyword:
AnsiString url = uri->URLEncode(__classid(TIdURI), "the uri here");
Gambit
Re: Re. URLEncode
Author: Remy Lebeau (TeamB)
Date: Mon, 13 Mar 2006 21:30
Date: Mon, 13 Mar 2006 21:30
11 lines
1218 bytes
1218 bytes
"Elmar Baumann" <elmar-nospam@anywhere.net> wrote in message news:4415a141@newsgroups.borland.com... > TMetaClass *cl; That is not the correct way to get a value TMetaClass pointer. See my other reply. Gambit
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads