---
--- Generated by RyderLua
--- Created By Hsg69
--- January 5 2024 friday 10;27 am
---

local http = require "resty.http"

local client = http.new()

local res, err = client:request_uri("http://example.com/api/data", {
    method = "GET"
})

if not res then
    ngx.say("failed to request: ", err)
    return
end

-- You can now access the response body using res.body
ngx.say(res.body)

-- Don't forget to close the connection
client:close()
