Board index » delphi » Problems using TIdHttp 9 with Proxy
Lincoln
![]() Delphi Developer |
Sat, 21 May 2005 20:50:31 GMT
Problems using TIdHttp 9 with Proxy
Hi,
anybody have one samples of the solution or explanation about the problema I'm trying to make HTTP POST, with TidHttp Component. The problem is ISA Here is my code, is returned the message "HTTP/1.1 502 Proxy Error ( Host function TForm1.bExecutarHTTPSQL2(psURL: string; Quote} aStream: TMemoryStream; Params: TStringStream; bRetorno: boolean; oConexaoHTTP: TidHTTP; sDados, sSelect, stabela, sColuna, sColunas, sNome, sTotalRegistros: string; begin bRetorno := true; try sColunas := ''; // Monta string que ser enviada ao WebServiceSQL do ADPWeb // Extrai do comando SQL apenas a clausula SELECT, para saber sSelect := copy(psSQL, 1, pos('from', LowerCase(psSQL)) - 1); sSelect := sSelect + ','; while (length(sSelect) > 0) do stabela := copy(sSelect, 1, pos(',', sSelect) - 1); // Verifica se n?o existe nenhum campo com mesmo nome if bENumero(copy(sNome, 1, length(sNome))) = true then end; sDados := sDados + '<var name="' + sNome + sColunas := sColunas + ' ' + sNome + ' '; sSelect := trim(copy(sSelect, pos(',', sSelect) + 1, end; sDados := sDados + '<select>' + StringReplace(psSQL, '%', '%25', sDados := 'field_ticket=' + sTicket + psErro := ''; // Inicializa??o de variveis e objetos with oConexaoHTTP do Post(psURL, Params, aStream); except aStream.WriteBuffer(#0' ', 1); psXmlRetorno := PChar(aStream.Memory); except end; if oConexaoHTTP <> nil then Result := bRetorno; end; Very, very thanks .... |