geqintan commited on
Commit
0675213
·
1 Parent(s): bd1e9a9
Files changed (1) hide show
  1. app.lua +13 -1
app.lua CHANGED
@@ -1 +1,13 @@
1
- ngx.say("The URI is: ", ngx.var.uri)
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ local uri = ngx.var.uri
2
+ ngx.req.read_body()
3
+ local headers = ngx.req.get_headers()
4
+ local body = ngx.req.get_body_data()
5
+
6
+ ngx.say("URI: ", ngx.var.uri)
7
+ ngx.say("User-Agent: ", headers["User-Agent"])
8
+
9
+ if body then
10
+ ngx.say("Body: ", body)
11
+ else
12
+ ngx.say("Body is empty")
13
+ end