Fetch הוא API חדש שמקל על 'אחזר משאבים מרוחקים' בקלות רבה יותר. כמו XMLHttpRequest, אפשר להשתמש ב-Fetch כדי לשלוח בקשות לאותו מקור או לבקשות בכמה דומיינים. האחזור משתמש בממשק API נקי וחזק יותר שמפריד את הבקשה מהתגובה ומשתמש בהבטחה להחזרת התגובה.
מבוא ל-Fetch API
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-25 (שעון UTC).
[null,null,["עדכון אחרון: 2025-07-25 (שעון UTC)."],[],["Fetch API simplifies fetching remote resources, handling both same-origin and cross-domain requests. It offers a refined interface compared to XMLHttpRequest, distinguishing the request from the response. Crucially, Fetch utilizes promises to deliver the response, providing a more structured and efficient method for managing asynchronous operations. Its improved design aims to streamline the process of data retrieval from remote sources.\n"],null,[]]