Ver Mensaje Individual
  #16  
Antiguo 03-03-2022
[egostar] egostar is offline
Registrado
 
Registrado: feb 2006
Posts: 6.557
Reputación: 25
egostar Va camino a la fama
Cita:
Empezado por CrazySoft Ver Mensaje
Al añadir todo esto al HEAD, también dejo de dar error al usar HTTPRIO y valido el token correctamente



pero aun tengo problemas en consumo del servicio con HTTPRIO y cURL por causa del XML, que estoy aprendiendo



Gracias por toda la ayuda brindada hasta el momento y seguiré en el proceso



Código Delphi [-]
procedure TForm1.HTTPRIO1HTTPWebNode1BeforePost(const HTTPReqResp: THTTPReqResp; Data: Pointer);
var
  auth: string;

begin

  auth := 'Accept-Encoding: gzip,deflate';
  HttpAddRequestHeaders(Data, PChar(auth), Length(auth), HTTP_ADDREQ_FLAG_ADD);
  auth := 'SOAPAction: ""';
  HttpAddRequestHeaders(Data, PChar(auth), Length(auth), HTTP_ADDREQ_FLAG_ADD);
  auth := PAnsiChar('apiKey: TokenApi ' + Token);
  HttpAddRequestHeaders(Data, PChar(auth), Length(auth), HTTP_ADDREQ_FLAG_ADD);
  auth := 'Content-Type: text/xml;charset=UTF-8;';
  HttpAddRequestHeaders(Data, PChar(auth), Length(auth), HTTP_ADDREQ_FLAG_ADD);
  auth := 'User-Agent: Apache-HttpClient/4.5.5 (Java/12.0.1)';
  HttpAddRequestHeaders(Data, PChar(auth), Length(auth), HTTP_ADDREQ_FLAG_ADD);

end;

Muy bien, ya aprendimos todos algo nuevo.

Saludos
__________________
"La forma de empezar es dejar de hablar y empezar a hacerlo." - Walt Disney
Responder Con Cita