Fetch הוא API חדש שמקל על 'אחזר משאבים מרוחקים' בקלות רבה יותר. כמו XMLHttpRequest, אפשר להשתמש ב-Fetch כדי לשלוח בקשות לאותו מקור או לבקשות בכמה דומיינים. האחזור משתמש בממשק API נקי וחזק יותר שמפריד את הבקשה מהתגובה ומשתמש בהבטחה להחזרת התגובה.
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2024-08-09 (שעון UTC).
[null,null,["עדכון אחרון: 2024-08-09 (שעון UTC)."],[[["Fetch API simplifies fetching remote resources, offering a more streamlined approach than XMLHttpRequest."],["It supports both same-origin and cross-domain requests for versatile resource retrieval."],["Fetch API provides a clear separation between request and response for enhanced code organization."],["It leverages promises for efficient asynchronous handling of responses, improving code readability and performance."]]],["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"]]