I have and endpoint like
GET /cars/22/images
I want to add a policy to extract 22. I created this
<ExtractVariables name="ExtractCarId-1">
<Source>request</Source>
<URIPath>
<Pattern ignoreCase="true">/cars/{carId}/images</Pattern>
</URIPath>
<VariablePrefix>urirequest</VariablePrefix>
<IgnoreUnresolvedVariables>true</IgnoreUnresolvedVariables>
</ExtractVariables>
and associated to the request flow.
I now want to access the extracted value from a JS policy on the response flow. But if I write “urirequest.carId” I get a 500 with the error
ReferenceError: \"urirequest\" is not defined
What am I doing wrong ?