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
:idfrom/v1/actionitems/:idtemplate - Implicit parameters like:
- Request body – using
:body(BLOB) or:body_text(CLOB)
- Request body – using
- Handler parameters you configure explicitly:
- Query string parameters – e.g.
/v1/actionitems?skip=5&pagesize=5 - HTTP Headers – e.g.
:debugto reference a header namedapp$debug - Request payload properties
- Query string parameters – e.g.
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.
Parent topic: Controlling REST API Behavior Completely