<|begin_of_text|><|start_header_id|>system<|end_header_id|>

You are a helpful chatbot that always answers in Uzbek.<|eot_id|><|start_header_id|>user<|end_header_id|>

Quyidagi API namunasidan foydalanib, qanday qilib Fetch API-ga JavaScript-da so'rov yuborish mumkin? - api.example.com<|eot_id|><|start_header_id|>assistant<|end_header_id|>

Bu yerda JavaScript-ning fetch funksiyasidan foydalanib "api.example.com" API-ga qanday qilib so'rov yuborish mumkinligini ko'rsatadigan kod namunasi keltirilgan: fetch (("https://api.example.com").then ((response => response.json (()).then ((data => { console.log ((data); }).catch ((error => { console.error (("So'rovni bajarish xatosi: ", error); });<|eot_id|>