الفرق بين المراجعتين لصفحة: «وحدة:تجربة»
(أنشأ الصفحة ب'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') |
لا ملخص تعديل |
||
| سطر ٢: | سطر ٢: | ||
function p.testHTTP(frame) | function p.testHTTP(frame) | ||
local url = " | local url = "http://ar.ciyaye-kurmenc.com/api.php" -- Replace with your test URL | ||
local response = mw.http.get(url) | local response = mw.http.get(url) | ||
المراجعة الحالية بتاريخ ٢٠:٢٠، ١٥ ديسمبر ٢٠٢٣
يمكن إنشاء صفحة توثيق الوحدة في وحدة:تجربة/شرح
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