انتقل إلى المحتوى
أمين أبوزيد
درس مخطط لهJNR-017-L01

نظرة ثانية على الطرق: الأمان وعدم تأثر النتيجة بالتكرار

  • الدرس 1 من 6
  • Junior
في هذا الدرس 4 موضوعات

هذا الدرس مخطط له. يعرض المخطط أدناه الموضوعات التي سيغطيها، ولم يُنشر الدرس الكامل بعد.

نص الدروس والتمارين باللغة الإنجليزية، بينما تبقى واجهة الموقع وعناوين الدروس بالعربية.

في هذا الدرس

classify HTTP methods and explain why retries depend on it.

الموضوعات المخطط لها

  • Safe means the request does not change server state (reading only). GET, HEAD, OPTIONS are safe.
  • Idempotent means doing it once or ten times leaves the server in the same state. GET, PUT, DELETE are idempotent.
  • POST is neither safe nor idempotent: two identical calls can create two orders.
  • PATCH is not guaranteed idempotent; it depends on what the patch says.
  • Clients, proxies, and load balancers may retry idempotent calls automatically. A non-idempotent retry can duplicate work.
تفاصيل المخطط المبدئي

عرض عملي

MethodSafeIdempotent
GETyesyes
PUTnoyes
DELETEnoyes
POSTnono

اختبر فهمك

Why is it fine to retry PUT /products/5 after a timeout?

أظهر الإجابة

Repeating it leaves the same final state.

التطبيق

طبّق هذا الدرس بمختبر الوحدة وتمارينها واختبارها.

المختبر والتمارين الاختبار

تعليم الدرس كمكتمل اختياري ويمكنك التراجع عنه في أي وقت. يبقى تقدمك محفوظًا في هذا المتصفح.

اكتب للبحث في المستويات والمراحل والوحدات والدروس.