oracle-databaseapitransfer-encoding

Oracle ORDS - Can I control the Transfer-Encoding?


Please note I'm new to APIs and ORDS.

I've created a few APIs with Oracle Rest Data Services (ORDS) which returns 30,000 records at a time. I've noticed in the return header that Transfer-Encoding is chunked.

Another similar API has Transfer-Encoding set to gzip - this reduces the size from more than 14Mb to 8Mb (and increases performance). Is this setting in my control when configuring the API with ORDS? How do I set this please?


Solution

  • I eventually found the solution:

    OWA_UTIL.mime_header('application/json', FALSE);
    HTP.p('Transfer-Encoding: gzip');
    OWA_UTIL.http_header_close;