Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local http = require "resty.http"
- local httpc = http.new()
- local res, err = httpc:request_uri("https://www.google.com/")
- if not res then
- ngx.log(ngx.ERR,"failed to request: ", err)
- return
- end
- ngx.status = res.status
- ngx.say(res.status)
- ngx.say(res.body)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement