Hi Team,
Greetings !
There is an urgent requirement for me,where the request to apigee is
GET https://domain.com/v1/api?q=A1,A2,A3...An
(where q is a query parameter and n is between 1 and 10 in all use cases)
Customer's use case requires to fire requests from apigee to target like
GET https://domain.com/v1/api?q=A1 GET https://domain.com/v1/api?q=A2 GET https://domain.com/v1/api?q=A3
Is above feasible in apigee.
We use Enterprise version of OPDK.
Can you help me please?
Solved! Go to Solution.
You cannot loop through and make calls to backend targets in the usual way using target endpoints. Apigee is just a façade to expose the backend services.
It may not be a good practice to loop multiple http calls, but if you still want to do it, you will need to use javascript httpclient to make the calls and process the response. You can explore the parallel processing option in javascript httpclient library. You can check the samples provided in the below docs
https://docs.apigee.com/api-platform/samples/cookbook/implementing-http-clients-javascript
You cannot loop through and make calls to backend targets in the usual way using target endpoints. Apigee is just a façade to expose the backend services.
It may not be a good practice to loop multiple http calls, but if you still want to do it, you will need to use javascript httpclient to make the calls and process the response. You can explore the parallel processing option in javascript httpclient library. You can check the samples provided in the below docs
https://docs.apigee.com/api-platform/samples/cookbook/implementing-http-clients-javascript
above worked finally 🙂 .Thank you and appreciated.