Error in return of get from delphi to php

0

I submit the following get in php

http://site.com.br/Autenticacao/index.php?conteudo={"Login":"[email protected]","Senha":"123","Posicao":{"Latitude":"-18.8693459","Longitude":"-41.955664"}}

And I get

http://site.com.br/Autenticacao/index.php?Situcao=O&idCliente=714107-e72ca8-9aca93-0ec496-cc0e30

I sent a json and returned a get, plus even returning json gives the same error.

Aja wheel blza, more when I do in delphi, returns the following error

  

HTTP / 1.1.302.Moved Temporary

I'm doing the following in delphi

procedure TForm2.Button1Click(Sender: TObject);
var     Urls  : string;
begin

   Urls := 'http://usebum.com.br/Autenticacao/index.php?conteudo={"Login":"[email protected]","Senha":"123","Posicao":{"Latitude":"-18.8693459","Longitude":"-41.955664"}}';
   urls := IdHTTP1.Get(Urls);
end;

I'm using delphi 2010

    
asked by anonymous 08.01.2017 / 19:53

1 answer

1

Try to save the response in a StringStream.

procedure TForm2.Button1Click(Sender: TObject);
    var     Urls  : string;
    lResponse : TStringStream;
    begin
    lResponse := TStringStream.Create('');

    try
    urls := IdHTTP1.Get('http://usebum.com.br/Autenticacao/index.php?conteudo={"Login":"[email protected]","Senha":"123","Posicao":{"Latitude":"-18.8693459","Longitude":"-41.955664"}}', lResponse);
    finally
    lResponse.Free();
end;

lResponse will contain page content

    
08.01.2017 / 20:05