[英]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.