Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Internet
Registrarse FAQ Miembros Calendario Guía de estilo Buscar Temas de Hoy Marcar Foros Como Leídos

Colaboración Paypal con ClubDelphi

 
 
Herramientas Buscar en Tema Desplegado
  #3  
Antiguo 16-06-2020
novato_erick novato_erick is offline
Miembro
 
Registrado: ago 2010
Ubicación: Panamá
Posts: 397
Poder: 16
novato_erick Va por buen camino
Cita:
Empezado por Neftali [Germán.Estévez] Ver Mensaje
¿Exactamente cómo añades los parámetros a la cabecera en RESTDebugger?
Hay varias formas de hacerlo...
Agradecido por recibir respuesta Neftali y es un privilegio que prestes atención a mi duda:

1-Por la misma aplicación REST Debugger de Embarcadero
Pestaña de Resquest:

GET (http://app.dominio.com/api)
Cita:
Si aplico https me manda error REST request failed: Error connecting with SSL. error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure pero este es tema de otro hilo de foro
Content-Type: application/json


Pestaña de parámetro
Add
Kind
HEADER
Name: X-IFX-Token
Value: f22db1478793f17cd4d5dfdasdcfasdfxxxxxx

y Así los otros parametros como:
Add
Kind
[GET/POS]
Name: action
Value: customers
Add
Kind
[GET/POS]
Name: action
Value: customers

2-Copiando los componente desde REST Debugger de Embarcadero y pegandolo en el modulo
y modificando igual las propiedades. //Pero en principio es lo mismo que en la primera opción presentada

3-ahora mismo intentando :

Código Delphi [-]
procedure TuConfigura.Button1Click(Sender: TObject);
var
UrlConectar: String;
RESTClient1: TRESTClient;
RESTResponse1 : TRESTResponse;
begin
UrlConectar := eURL.Text; {'http://app.dominio.com/api'; al usar https me manda el error también antes escrito error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure}
  try
    RESTClient1 := TRESTClient1.Create(nil);
       try
           RESTResponse1.Create(nil);
                 try
                     RESTClient1.BaseURL := UrlConectar;
                     RESTClient1.SetHTTPHeader('X-IFX-Token:', 'f22db1478793f17cd4d5dfdasdcfasdfxxxxxxf');
                 finally
                     RESTClient1.Free;
                 end;
              if Assigned(RESTResponse1.JSONValue) then
              begin
                 TextoRespuesta := TJson.Format(RESTResponse1.JSONValue);
              end
              else
              begin
                 TextoRespuesta := RESTResponse1.Content;
              end;
       finally
            RESTResponse1.Free;
       end;
  except
    on E: Exception do
      ShowMessage(E.ClassName + ': ' + E.Message);
  end;
end;

Agradeciendo su colaboracion;

Saludos;
Responder Con Cita
 


Herramientas Buscar en Tema
Buscar en Tema:

Búsqueda Avanzada
Desplegado

Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
Invocar un api rest con headers IVAND Internet 16 09-04-2024 13:15:03
TjsonObject como parámetro SERVICIO REST igentile Varios 5 06-11-2015 14:17:06
Error "Oxygene no es un lenguaje admitido" mamen .NET 0 28-05-2010 12:44:10
dbgrid con sub-headers samantha jones Varios 1 02-03-2005 21:30:25
Indicador de orden en los headers de un TListView walrus OOP 1 11-10-2004 19:50:30


La franja horaria es GMT +2. Ahora son las 09:30:40.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi