lua-resty-http
lua-resty-http copied to clipboard
Lua HTTP client cosocket driver for OpenResty / ngx_lua.
Hello, I have an issue while trying to send HTTP POST request to remote host. I get "closed" error message and I can't understand what is the problem. This is...
` -- 引入必要的Lua库 local http = require("resty.http") -- 创建全局的连接池 local httpc_pool = {} -- 获取参数变量url local url = ngx.var.arg_url if not url then ngx.status = ngx.HTTP_BAD_REQUEST ngx.say("Missing 'url' parameter") ngx.exit(ngx.HTTP_BAD_REQUEST)...
I am using OpenResty version 1.19.9 ngx_ Lua to 0.10.20. I am currently using resty.http to configure bidirectional authentication for HTTPS TLS. What configuration do I need to do or...
### **前提** 电脑: 其他安装版本(使用nginx源码编译的方式集成 lua, 而非 openresty): ``` nginx version: nginx/1.23.4 lua version: Lua 5.4.5 Copyright (C) 1994-2023 Lua.org, PUC-Rio luajit version: LuaJIT 2.1.0-beta3 -- Copyright (C) 2005-2022 Mike Pall....
上层nginx->下层nginx->demo, 当两个nginx 使用 httpc:request_uri() 链式请求时,下层nginx正常,上层nginx 提示如下异常, request_uri(): unread data in buffer, 这将导致无法进行nginx之间无法使用该方法进行长连接, 有什么好的解决办法吗?
The trailer headers should be in the following [format](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Trailer): ``` ...... 0\r\n Trailer-Header-A: foo\r\n ... \r\n ``` However, the code thought there is an extra `\r\n` between `0\r\n` and `Trailer-Header-A:...
ERROR Stacks: ```sh 2023/04/06 14:14:08 [error] 121939#121939: *28808 lua entry thread aborted: runtime error: /usr/local/apisix//deps/share/lua/5.1/resty/http.lua:365: bad argument #1 to 'str_sub' (string expected, got boolean) stack traceback: coroutine 0: [C]: in...
I am using openresty http library (v0.16.1) inside a custom kong plugin. I need to make an api call through a http proxy if it is configured. So my current...
访问一个接口 ,大致使用如下代码实现  第一次访问是正常的  紧接着第二次就会出错  按理说设置了连接池不应该这样啊 而且我发现无论如何访问 都是一次正常访问 一次会出现超时情况 很奇怪