In some cases, you might want to modify all the responses from a certain type of service.
For example, if all patients show their date of birth, but you would like to show their age.
You could either subscribe to each API that returns a patient entity in its response, or you could use the
ADAPT_ENTITY option instead.
To subscribe to with
ADAPT_ENTITY, see the following article.
interceptions.type to pass
ADAPT_ENTITY parameter and in
interceptions.entityTypeName pass the name of the entity you would like to intercept.
For example passing the
patient entity name will result in BioT hooking your lambda to the following API calls:
As seen in
POST_REQUEST, the code will receive the original API response body and is expected to return it, modified or not, as the lambda response.
Note that the
ADAPT_ENTITYcallbacks are made after
POST_REQUESTcallbacks. This means that changes made during
POST_REQUESTwill override the
Updated 4 months ago