Re: URLEncode problem

Giganews Newsgroups
Subject: Re: URLEncode problem
Posted by:  Brian (n…
Date: Sun, 5 Jun 2005

Hi Gambit

The below code was writting uasing the Indy
that came with Delphi 6 pro, i have looked at
the help file and all it saids is

AURLString := TIdURI.URLEncode(AString);

It doesn't say anything about the below unsing <protocol>

code is ment to send some info via http to a PHP emailer
script (long reson why its done this way)

    aStream := TMemoryStream.create;
    Params := TStringStream.create('');

    T2SLiveMain.IdHTTP1.Request.ContentType :=

    if cc <> '' then Params.WriteString(TIdURI.URLEncode('cc='+cc+'&'));

      T2SLiveMain.IdHTTP1.Post(EmailerLocation, Params, aStream);
      aStream.WriteBuffer(#0' ', 1);
      aStream.Position := 0;
      DoError('ERROR-31: Could not send report to emailer');
    end; // try


"Remy Lebeau (TeamB)" <> wrote in message
> "Brian" <n…> wrote in message
> news:E97B6FD07CCDE240n…
>> I have recently upgraded to Indy 10, when I try to run the
>> TIdURI.URLEncode I get an error saying protocol not set,
>> why?
> What string value are you passing in to begin with?  It must begin with
> "<protocol>://" where "<protocol>" is something like "http", "ftp", etc.
> Gambit


In response to

Re: URLEncode problem posted by Remy Lebeau (TeamB) on Sun, 5 Jun 2005