title: delphi 2010 - tidhttp post
body: <p>i want to post data to the following url:</p>
  
  <p><a href="http://mehratin.heroku.com/personals/new" rel="nofollow">http://mehratin.heroku.com/personals/new</a></p>
  
  <p>i write the following code but has problem:</p>
  
  <pre><code>procedure TForm1.Button3Click(Sender: TObject);
  var
    aStream: TMemoryStream;
    Params: TStringList;
  begin
    aStream := TMemoryStream.Create;
    Params := TStringList.Create;
    try
      with IdHTTP1 do
      begin
        Params.Add('fname=123');
        Params.Add('lname=123');
        Request.ContentType := 'application/x-www-form-urlencoded';
        try
          Response.KeepAlive := False;
          Post('http://localhost:3000/personals/new', Params);
        except
          on E: Exception do
            showmessage('Error encountered during POST: ' + E.Message);
        end;
      end;
  </code></pre>
  
  <p>how can i post data by TIDHtttp.post method in delphi 2010?</p>