14.7.2 Using Handler Bind Variables

Use handler bind variables to read URL values, request bodies, parameters, and headers.

Your handler can use bind variables to access any of the following information in the incoming request:

  • URL path variables – like :id from /v1/actionitems/:id template
  • Implicit parameters like:
    • Request body – using :body (BLOB) or :body_text (CLOB)
  • Handler parameters you configure explicitly:
    • Query string parameters – e.g. /v1/actionitems?skip=5&pagesize=5
    • HTTP Headers – e.g. :debug to reference a header named app$debug
    • Request payload properties

Caution:

Your handler can only reference either the :body or :body_text variable, and you can reference the one you pick only a single time. Any attempt beyond the first one to read a body variable returns null. So, if you need to reference either one in multiple places, assign the bind variable to a local PL/SQL variable first, then reference the variable anywhere you need to.