Club Delphi  
    FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > API de Windows
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

 
 
Herramientas Buscar en Tema Desplegado
  #1  
Antiguo 27-09-2021
mpg mpg is offline
Registrado
 
Registrado: nov 2017
Posts: 2
Poder: 0
mpg Va por buen camino
Enviar Json A Webservice

BUENOS DIAS,
NECESITO ENVIAR A UN WEBSERVICE 2 PARAMETROS ( user , secret_key ) JSON , PERO ME ERROR HTTP/1.1 500 Internal Server Error.
ENVIO FUENTE .
GRACIAS

Código Delphi [-]
  restclient1.BaseURL := 'aqui pongo la url donde envio';
  RESTClient1.ContentType := 'ctAPPLICATION_JSON';
  s := '{ "user": "1111","secret_key": "11111" }';
  RESTRequest1.Method := TRESTRequestMethod.rmPOST;
  RESTRequest1.ADDBODY(S);
  RESTRequest1.Params.AddItem; //Adds a new Parameter Item
  RESTRequest1.Params.Items[0].Value := s; //Adds the value of the parameter, in this case, the JSON data.
  RESTRequest1.Params.Items[0].ContentType := ctAPPLICATION_JSON; //sets the content type.
  RESTRequest1.Params.Items[0].Kind := pkGEToRPOST; //sets the kind of request that will be executed.
  restrequest1.Execute;

Última edición por Neftali [Germán.Estévez] fecha: 27-09-2021 a las 16:24:59.
Responder Con Cita
 



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
Enviar factura electronica via webservice elguille Varios 20 08-05-2023 23:31:17
WebService JSON undersea Internet 1 14-05-2020 12:21:50
Enviar JSON a una URL con Delphi 7 heidenber Internet 3 22-11-2017 15:42:50
Enviar PDFs por un Webservice ruedabeat2003 Internet 3 20-04-2012 20:53:01
Enviar Array a WebService hecho en java underwater Varios 1 07-01-2010 15:01:12


La franja horaria es GMT +2. Ahora son las 20:35:43.


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