Chuck,

REST can return JSON or XML. JSON is always easier to work with than XML. You 
just parse the response into an object variable, then work with that.


C_LONGINT($vl_ResponseStatusCode)
C_BLOB($vx_Response)
C_OBJECT($vo_Response)
C_TEXT($vt_URL)
C_TEXT($vt_JSONText)

$vt_URL:= “Build Your REST request URL here"

$vl_ResponseStatusCode:=HTTP Get($vt_URL;$vx_Response)

If($vl_ResponseStatusCode =200)
        If(BLOB size($vx_Response)>0)
                $vt_JSONText:=BLOB to text($vx_Response;UTF8 text without 
length)
                $vo_Response:=JSON Parse($vt_JSONText)    //You now have an 
object variable with the response data
        End if
End if


**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[email protected]
**********************************************************************

Reply via email to