79777711

Date: 2025-09-29 03:11:01
Score: 0.5
Natty:
Report link

See https://github.com/daurnimator/lua-http/blob/master/examples/simple_request.lua#L13-L50

local http_request = require "http.request"

local req = request.new_from_uri("https://example.org")
req.headers:upsert(":method", "POST")
req:set_body("body text")
local headers, stream = assert(req:go())
local body = assert(stream:get_body_as_string())
if headers:get ":status" ~= "200" then
    error(body)
end
Reasons:
  • Probably link only (1):
  • Contains signature (1):
  • Has code block (-0.5):
  • High reputation (-1):
Posted by: daurnimator