HTTP

محاكاة استجابة 424 Failed Dependency

The request failed because it depended on another request that failed (WebDAV).

عرض المرجع الكامل →

1 استجابة HTTP

استجابة HTTP
HTTP/1.1 424 Failed Dependency
Content-Type: application/json
Date: Tue, 25 Feb 2026 12:00:00 GMT
Content-Length: 62

{
  "error": "failed_dependency",
  "message": "Failed Dependency"
}

2 اختبار باستخدام curl

terminal
curl -i https://httpbin.org/status/424

3 إرجاع 424 Failed Dependency في إطار العمل الخاص بك

django
from django.http import JsonResponse


def my_view(request):
    return JsonResponse(
        {"error": "failed_dependency", "message": "Failed Dependency"},
        status=424,
    )
flask
from flask import Flask, jsonify

app = Flask(__name__)


@app.route("/endpoint")
def my_endpoint():
    return jsonify({"error": "failed_dependency", "message": "Failed Dependency"}), 424
fastapi
from fastapi import FastAPI
from fastapi.responses import JSONResponse

app = FastAPI()


@app.get("/endpoint")
def my_endpoint():
    return JSONResponse(
        content={"error": "failed_dependency", "message": "Failed Dependency"},
        status_code=424,
    )
express.js
// Express.js
app.get('/endpoint', (req, res) => {
  res.status(424).json({"error": "failed_dependency", "message": "Failed Dependency"});
});
spring boot
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import java.util.Map;

@RestController
public class MyController {

    @GetMapping("/endpoint")
    public ResponseEntity<Map<String, Object>> myEndpoint() {
        return ResponseEntity
            .status(424)
            .body(Map.of("error", "failed_dependency",
                         "message", "Failed Dependency"));
    }
}
go net/http
package main

import (
    "encoding/json"
    "net/http"
)

func myHandler(w http.ResponseWriter, r *http.Request) {
    w.Header().Set("Content-Type", "application/json")
    w.WriteHeader(424)
    json.NewEncoder(w).Encode(map[string]string{
        "error":   "failed_dependency",
        "message": "Failed Dependency",
    })
}
ruby on rails
class MyController < ApplicationController
  def my_action
    render json: {"error": "failed_dependency", "message": "Failed Dependency"},
           status: :failed_dependency
  end
end
asp.net core
// ASP.NET Core Minimal API
app.MapGet("/endpoint", () =>
    Results.Json(
        new { error = "failed_dependency", message = "Failed Dependency" },
        statusCode: 424
    )
);

المزيد من صفحات محاكاة HTTP