简体   繁体   English

如何在Apigee中使用一个代理调用2个端点?

[英]How do I call 2 endpoints with one proxy in Apigee?

Hi I am trying to call two different endpoints via one proxy here. 嗨,我正在尝试通过一个代理在这里调用两个不同的端点。

1st endpoint: basically its the java-script I coded into the .js file 2nd endpoint: this is an endpoint where I have to send the request to a third-party URL and get the response and return. 第一个端点:基本上是我编写到.js文件中的Java脚本。第二个端点:这是一个端点,我必须在其中将请求发送到第三方URL并获取响应并返回。

So I want to send a parameter in my query string like this: 所以我想像这样在我的查询字符串中发送一个参数:

http://[url to my apigee proxy]/endpoint?stub=true

If this is the url then it should go to my JavaScript code. 如果这是网址,则应转到我的JavaScript代码。 If this is the url: 如果这是网址:

http://[url to my apigee proxy]/endpoint?stub=false

Then it should go to a third party url. 然后,它应该转到第三方网址。 I have already looked and tried to implement this; 我已经查看并尝试实现此目标; http://stackoverflow.com/questions/22783986/one-api-proxy-calling-two-different-target-endpoints but it's not working for me. http://stackoverflow.com/questions/22783986/one-api-proxy-calling-two-different-target-endpoints但这对我不起作用。

Any suggestions will be appreciated. 任何建议将不胜感激。

行为

Your missing target endpoints. 您缺少的目标端点。 Please add target endpoint xml . 请添加目标端点xml Also take look at samples which will help you along side documentation. 还请查看示例 ,这些示例将帮助您完善文档。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 React-Admin:如何从一个单击事件中同时调用两个端点<form></form> - React-Admin: How do I call two endpoints simultaneously from one click event within a <form> 如何同时调用两个不同的REST api端点,并在我的应用程序的一个端点上显示来自这两个端点的数据? - How do I call two different REST api endpoints simultaneously and display the data from both on one endpoint of my app? 如何保护JavaScript / Ajax客户端[apigee]中使用的API? - How do I secure an API that is used in a JavaScript/Ajax client [apigee]? 如何使用Apigee Edge策略进行JSON模式验证? - How do I do JSON schema validation using Apigee Edge policies? 如何依次调用两个API端点? - How to call two API endpoints one after another? 如何依次调用web服务端点? - How to call web service endpoints one after other? 如何将Moment.js与Apigee API代理一起使用? - How to use Moment.js with Apigee API proxy? 如何在Apigee中使用JavaScript在多个位置替换json属性值 - How do I replace json property value in multiple places using JavaScript in Apigee 如何在 JavaScript 中调用另一个构造函数? - How do I call one constructor from another in JavaScript? 如何以一个参数升序调用方法? - How do I call method based on one parameter in ascending order?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM