أداة مجانية

HTTP Status Codes Reference

مرجع شامل وقابل للبحث لجميع رموز حالة HTTP القياسية — من 1xx إلى 5xx. قم بالتصفية حسب الفئة، والبحث حسب رقم الرمز أو الوصف.

HTTP Status Codes Reference

Showing 60 of 60 codes

100
Continue

Server has received request headers; client should proceed.

101
Switching Protocols

Server is switching to a different protocol as requested.

200
OK

The request succeeded.

201
Created

A new resource was successfully created.

202
Accepted

Request accepted but not yet completed.

203
Non-Authoritative Information

Metadata differs from the origin server.

204
No Content

Request succeeded; no response body.

205
Reset Content

Request succeeded; client should reset the document view.

206
Partial Content

Partial resource returned due to range request.

207
Multi-Status

Multiple status codes for multiple operations.

208
Already Reported

Members already enumerated in a previous reply.

226
IM Used

Response is a result of instance manipulations.

300
Multiple Choices

Multiple representations available; user must choose.

301
Moved Permanently

Resource permanently moved to a new URL.

302
Found

Resource temporarily at a different URL.

303
See Other

Redirect to a different URL with GET.

304
Not Modified

Resource unchanged; use cached version.

305
Use Proxy

Must access through a specified proxy.

307
Temporary Redirect

Temporary redirect; preserve HTTP method.

308
Permanent Redirect

Permanent redirect; preserve HTTP method.

400
Bad Request

Server cannot process the request due to client error.

401
Unauthorized

Authentication is required.

402
Payment Required

Payment required to access this resource.

403
Forbidden

Server refuses to fulfil the request.

404
Not Found

The requested resource does not exist.

405
Method Not Allowed

HTTP method not supported for this endpoint.

406
Not Acceptable

Cannot produce a response matching Accept headers.

407
Proxy Authentication Required

Proxy authentication is required.

408
Request Timeout

Server timed out waiting for the request.

409
Conflict

Request conflicts with the current state.

410
Gone

Resource permanently deleted and will not return.

411
Length Required

Content-Length header is required.

412
Precondition Failed

Precondition in headers evaluated to false.

413
Content Too Large

Request body exceeds server size limit.

414
URI Too Long

The request URL is too long.

415
Unsupported Media Type

Request Content-Type is not supported.

416
Range Not Satisfiable

Requested byte range cannot be satisfied.

417
Expectation Failed

Server cannot meet the Expect header requirement.

418
I'm a Teapot

The server is a teapot — an April Fools' joke code.

421
Misdirected Request

Request directed at a server unable to produce a response.

422
Unprocessable Content

Request is well-formed but contains semantic errors.

423
Locked

The resource is locked (WebDAV).

424
Failed Dependency

Request failed because a dependency failed (WebDAV).

425
Too Early

Server unwilling to process a potentially replayed request.

426
Upgrade Required

Client must upgrade to a different protocol.

428
Precondition Required

Conditional request header required.

429
Too Many Requests

Rate limit exceeded.

431
Request Header Fields Too Large

Request headers are too large.

451
Unavailable For Legal Reasons

Resource unavailable due to legal restrictions.

500
Internal Server Error

Unexpected server-side error.

501
Not Implemented

Server does not support the request method.

502
Bad Gateway

Invalid response from an upstream server.

503
Service Unavailable

Server temporarily unable to handle the request.

504
Gateway Timeout

Upstream server did not respond in time.

505
HTTP Version Not Supported

HTTP version not supported.

506
Variant Also Negotiates

Content negotiation circular reference.

507
Insufficient Storage

Server has insufficient storage (WebDAV).

508
Loop Detected

Infinite loop detected (WebDAV).

510
Not Extended

Further extensions required to process the request.

511
Network Authentication Required

Client must authenticate to access the network.

ما هي رموز حالة HTTP؟

رموز حالة HTTP هي أرقام مكونة من ثلاثة أرقام يعيدها الخادم استجابةً لطلب العميل. يحدد الرقم الأول فئة الاستجابة: 1xx معلوماتي، 2xx نجاح، 3xx إعادة توجيه، 4xx أخطاء العميل، و 5xx أخطاء الخادم. يجب أن تتضمن كل استجابة HTTP رمز حالة.

لماذا تأهمية رموز الحالة؟

رموز الحالة هي الطريقة الأساسية لخوادم الويب للتواصل بنتيجة الطلب. تحسن رموز الحالة الصحيحة تحسين محرك البحث (على سبيل المثال 301 مقابل 302 لإعادة التوجيه)، وتمكن معالجة الأخطاء الصحيحة في العملاء، وهي حرجة لتصميم REST API. قد يؤدي استخدام الرمز الخاطئ إلى مشاكل في التخزين المؤقت أو كسر منطق العميل أو تضليل زحافات محرك البحث.

كيفية الاستخدام

  1. اكتب رقم رمز أو كلمة رئيسية في مربع البحث لتصفية فوري.
  2. انقر على علامة تبويب فئة لتضييق النتائج على فئة معينة.
  3. انقر على أي صف لتوسيع الوصف الكامل، وملاحظات الاستخدام، والأسباب الشائعة.
  4. استخدم زر النسخ على أي صف لنسخ رمز الرقم إلى الحافظة.

من مدونة Skybin

Free developer tools from Skybin

اقرأ الدليل على Skybin

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

ما الفرق بين 301 و 302؟
301 Moved Permanently يخبر العملاء ومحركات البحث أن المورد قد انتقل إلى عنوان URL جديد إلى الأبد — يجب على العملاء تحديث الإشارات المرجعية وتنقل محركات البحث قيمة الارتباط. 302 Found هي إعادة توجيه مؤقتة؛ يجب على العملاء الاستمرار في استخدام عنوان URL الأصلي للطلبات المستقبلية.
متى يجب أن أستخدم 400 مقابل 422؟
استخدم 400 Bad Request للصيغة المشوهة أو الحقول المفقودة المطلوبة التي تجعل الطلب غير قابل للتحليل. استخدم 422 Unprocessable Content (سابقاً 422 Unprocessable Entity) عندما تكون الصيغة صحيحة لكن التعليمات الواردة فيها لا يمكن متابعتها — على سبيل المثال، نص JSON صحيح تماماً لكنه يفشل في قواعد التحقق من الأعمال.
ماذا يعني 503 وما الفرق بينه وبين 500؟
500 Internal Server Error يعني أن الخادم واجه حالة غير متوقعة — حل شامل عام للاستثناءات غير المعالجة. 503 Service Unavailable يعني أن الخادم غير قادر مؤقتاً على معالجة الطلب، عادة بسبب الصيانة أو الإرهاق. يعني 503 حالة مؤقتة وغالباً ما يصحبه رأس Retry-After.
هل يجب على REST API أن يعيد 200 أو 204 للحذف؟
204 No Content هي الاستجابة المفضلة لحذف ناجح عندما لا يكون هناك جسم للعودة. استخدم 200 OK إذا كنت تريد إعادة جسم (على سبيل المثال، المورد المحذوف أو رسالة تأكيد). كلاهما صحيح؛ 204 يستخدم على نطاق واسع في REST APIs الحديثة.