Skip to Content
Mar 09, 2018 at 12:36 AM

API Management: target.url and is null in JavaScript in TargetEndpoint Preflow Policy

620 Views Last edit Mar 09, 2018 at 12:37 AM 2 rev

Hi All,

I need to do an additional request to the backend before the original request.

So I have in the Policy in the TargetEndpoint Preflow a JavaScript call.

But I can't access the host I need for the url in "new Request(url, 'GET', headers)".

Both target.url and are null, is only filled in the PostFlow.

Eg the example JS File uses context.getVariable("target.url") which always null in my tests. so this will also not work.

Any idea how to solve this problem?