رموز HTTP

مرجع رموز حالة HTTP

كيفية استخدام رموز HTTP

  1. 1ابحث عن رمز الحالة بالرقم أو الاسم
  2. 2أو تصفّح حسب الفئة (2xx، 3xx، إلخ)
  3. 3اقرأ الشرح التفصيلي والاستخدامات

حول رموز HTTP

مرجع رموز حالة HTTP هو دليل شامل لجميع رموز استجابة HTTP مع شرح تفصيلي لكل رمز وحالات استخدامه وكيفية التعامل معه. يغطي جميع الفئات من 1xx إلى 5xx مع أمثلة عملية.

المميزات الرئيسية لـ رموز HTTP

  • جميع رموز HTTP 1xx-5xx
  • بحث فوري بالرقم أو الاسم
  • شرح تفصيلي لكل رمز
  • حالات الاستخدام الشائعة
  • إرشادات التعامل مع الأخطاء
  • Common use cases and examples for each code
  • Works entirely in-browser — no server requests
  • Fast instant-search with no loading delay

أمثلة

رموز شائعة

أكثر رموز HTTP استخدامًا

المدخلات

200, 404, 500

النتيجة

200 OK: ناجح
404 Not Found: المورد غير موجود
500 Internal Server Error: خطأ في الخادم

Find the right error code for a rate-limited API response

Identify the standard code for communicating that a client has exceeded API rate limits.

المدخلات

Search: "rate limit" or code 429

النتيجة

429 Too Many Requests — Include a Retry-After header indicating when the client can retry.

حالات الاستخدام الشائعة

  • تصحيح أخطاء APIs
  • فهم استجابات الخادم
  • توثيق APIs
  • تعلم بروتوكول HTTP
  • تصحيح مشاكل الشبكة
  • Quick reference during development without leaving your browser tab

استكشاف الأخطاء

الخلط بين 401 و403

الحل

401 Unauthorized يعني عدم المصادقة، 403 Forbidden يعني المصادقة ناجحة لكن لا صلاحية

إساءة استخدام 200 للأخطاء

الحل

أعد رموز الخطأ الصحيحة (4xx/5xx) بدلاً من 200 مع رسالة خطأ في الجسم

Using 404 for authentication failures

الحل

Returning 404 instead of 401/403 for protected resources is a security technique to prevent resource enumeration, but it can confuse legitimate clients. Document your choice clearly in your API specification.

الأسئلة الشائعة

ما الفرق بين 301 و302؟

301 (Moved Permanently) للتحويلات الدائمة، 302 (Found) للمؤقتة — المتصفحات تتذكر 301 ولا تتذكر 302.

متى يستخدم 204؟

204 No Content يُستخدم عندما نجح الطلب لكن لا يوجد محتوى للإعادة — شائع في طلبات DELETE.

When should I use 200 vs 201 vs 204?

200 OK for successful GET requests, 201 Created for successful POST requests that create a resource, and 204 No Content for successful DELETE or PATCH requests that return no body.

What does 422 Unprocessable Entity mean?

422 indicates the request was well-formed (valid syntax) but semantically incorrect — the server understands the content type and syntax but cannot process the contained instructions. Common in REST APIs for validation errors.

What is the correct status code for a redirect?

301 Moved Permanently for permanent URL changes (browsers cache this), 302 Found for temporary redirects, and 307/308 to preserve the HTTP method (GET/POST) during the redirect.

When should I return 503 instead of 500?

500 Internal Server Error indicates an unexpected server-side failure. 503 Service Unavailable indicates the server is temporarily unable to handle the request (overloaded or under maintenance) and the client should retry later.

Is my data sent to a server?

No. The status code reference is statically loaded in your browser. No search queries or user interactions are transmitted to any server.

What does the 1xx status code range mean?

1xx codes are informational — they indicate the request was received and processing is continuing. The most common is 100 Continue, used when a client needs to send a large request body and checks if the server is willing to accept it first.