You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/02/23 10:47:13 UTC

[GitHub] [apisix] StretchV opened a new issue #3647: request help: 请问apisix代码中有发送http请求封装好的方法吗

StretchV opened a new issue #3647:
URL: https://github.com/apache/apisix/issues/3647


   ### Issue description
   我的需求是:每一个请求A过来后要先发送另一个请求B,从而获取B的结果然后根据这个结果自定义一个插件(插件的作用是:判断请求B的结果,向A请求加不同的头信息),想质询确认一下现有的代码中有发送http请求的函数吗,或者这种场景有推荐其他类的做法吗,redirect+proxy_rewrite插件的组合可以实现吗,因为我查看网上信息lua发送http请求貌似需要引入socket包,不太确定会不会对apisix造成影响
   ### Environment
   
   * apisix version (cmd: `apisix version`):   v2.3
   * OS (cmd: `uname -a`):
   * OpenResty / Nginx version (cmd: `nginx -V` or `openresty -V`):
   * etcd version, if have (cmd: run `curl http://127.0.0.1:9090/v1/server_info` to get the info from server-info API):
   * apisix-dashboard version, if have:
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] StretchV closed issue #3647: request help: 请问apisix代码中有发送http请求封装好的方法吗

Posted by GitBox <gi...@apache.org>.
StretchV closed issue #3647:
URL: https://github.com/apache/apisix/issues/3647


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] StretchV commented on issue #3647: request help: 请问apisix代码中有发送http请求封装好的方法吗

Posted by GitBox <gi...@apache.org>.
StretchV commented on issue #3647:
URL: https://github.com/apache/apisix/issues/3647#issuecomment-784133160


   ok  thank you very much


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] tokers commented on issue #3647: request help: 请问apisix代码中有发送http请求封装好的方法吗

Posted by GitBox <gi...@apache.org>.
tokers commented on issue #3647:
URL: https://github.com/apache/apisix/issues/3647#issuecomment-784111366


   @StretchV If you are writing your own plugins or tweaking APISIX, just use lua-resty-http. It's easy to use and won't add any dependencies.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org