Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

If we invoke the Service Callout policy twice in the same API Proxy, it's base path getting appended

If a serviceCallout Policy is called twice in same request it's base path getting appended.

As shown in the attached screenshot, you can notice that

  • The servicecallout.requesturi in the first invocation to Service Callout policy shows it as "/get"
  • However, when the same Service Callout policy is called the second time, the servicecallout.requesturi shows it as "/get/get".

Though the variable servicecallout.Service-Callout-1.target.url shows the value as "http://httpbin.org/get", the request goes as "http://httpbin.org/get/get" and results in a failure "404 Not Found" only for the second request. While the first invocation to Service Callout policy succeeds.

So, wanted to check are we allowed to use the same serviceCallout twice in the same API request?

0 11 1,424
11 REPLIES 11