وحدة:تجربة
يمكن إنشاء صفحة توثيق الوحدة في وحدة:تجربة/شرح
local p = {}
function p.testHTTP(frame)
local url = "http://ar.ciyaye-kurmenc.com/api.php" -- Replace with your test URL
local response = mw.http.get(url)
if response and response.body then
return "<p>HTTP request successful!</p>"
else
return "<p>HTTP request failed!</p>"
end
end
return p