Consuming REST API from Cache Objectscript

Primary tabs

I have an application in Cache 2013 (No Ensemble) which need to consume a REST web API over internet.

Can somebody please help me by pointing out the documentation or provide me code sample  for consuming the REST API from a routine/class.

I am using Cache 2008 (No Ensemble) .

  • 0
  • 0
  • 732
  • 0
  • 2

Answers

If the REST service is giving you JSON data, you'll have to use the Zen proxy object to consume it. Here's some documentation on how to convert JSON data to a proxy object (it doesn't actually require using Zen).

I'll add that Caché 2016.1 added some capabilities that make working with JSON much easier. See this introductory post, and this other post explaining how the syntax changed with 2016.2.