وحدة:تجربة

من موسوعة جياي كورمنج
مراجعة ٢٠:١٧، ١٥ ديسمبر ٢٠٢٣ بواسطة Iwings (نقاش | مساهمات) (أنشأ الصفحة ب'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