getResponseEx
Returns the HTTP response parsed with JSON or XML rules depending on the Content-type response header field. If no Content-type is available, then it uses the format specified by the iscobol.rest.default_stream configuration setting.
General format
void getResponseEx( data )
Syntax rules
1. data is a level 01 data item for which the IS IDENTIFIED clause has been used.
2. In a JSON response the following escapes are allowed: \b, \f, \n, \r, \t, \" and \\. Any other character preceeded by a backslash is considered invalid and makes the read fail unless you set iscobol.jsonstream.allow_backslash_escaping_any_character (boolean) to true in the configuration.
General rules
1. This method should be called after a request performed via one of the following methods: doGet, doPost, doPostEx or doPostMultipart.
Example
Consider the following responses:
Content-Type : application/json
Content:
{"response":{"status":"OK"}}
 
Content-Type : text/xml
Content:
<response><status>OK</status></response>
You can read both responses with the following code:
...
   configuration section.
   repository.
       class http-client as "com.iscobol.rts.HTTPClient"
...
   working-storage section.
   77 http object reference http-client.
   01 response identified by "response".
      03 identified by "status".
         05 status-data pic x any length.
...
   procedure division.
...
   http:>getResponseEx(response).
...