Árvore de páginas

Versões comparadas

Chave

  • Esta linha foi adicionada.
  • Esta linha foi removida.
  • A formatação mudou.

...

Bloco de código
languagedelphi
titleGFEA031 REST
linenumberstrue
/* Variaveis da consulta ao webservice */
DEFINE VARIABLE http     AS COM-HANDLE.
DEFINE VARIABLE strURL   AS CHARACTER.
DEFINE VARIABLE strRET   AS CHARACTER.
DEFINE VARIABLE iNumEntries AS INTEGER NO-UNDO.
DEFINE VARIABLE iLoop AS INTEGER NO-UNDO.
assign  strURL  =   'http://localhost:8020/rest/fwmodel/GFEA031'.
/* Le a informação do Retorno */
CREATE "MSXML2.XMLHTTP.3.0" http NO-ERROR.
http:OPEN("GET", strURL, FALSE).
http:setRequestHeader("Translate", "f").
http:setRequestHeader("Depth", "0").
http:setRequestHeader("tenantId", "T1,D MG 01 ").
http:SEND() NO-ERROR.
/* Armazena o retorno */
strRET = http:responseText.
MESSAGE strRET
    VIEW-AS ALERT-BOX INFO BUTTONS OK.
/* Se tiver erro, retorna o erro */
if strRET begins "Houve erro" then do:
   /* Trata */
end.
else do:
   /* Trata o retorno */
end.

...