الفرق بين المراجعتين لصفحة: «وحدة:تجربة»
(أنشأ الصفحة ب'local p = {} function p.testHTTP(frame) local url = "https://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') |
(لا فرق)
|
مراجعة ٢٠:١٧، ١٥ ديسمبر ٢٠٢٣
يمكن إنشاء صفحة توثيق الوحدة في وحدة:تجربة/شرح
local p = {}
function p.testHTTP(frame)
local url = "https://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