SIP
Simular respuesta 380 Alternative Service
The call was not successful but alternative services are possible. The response body contains a description of alternative services.
Ver referencia completa →1 Respuesta HTTP
HTTP/1.1 380 Alternative Service Content-Type: application/json Date: Tue, 25 Feb 2026 12:00:00 GMT
2 Probar con curl
curl -i https://httpbin.org/status/380
3 Devolver 380 Alternative Service en tu framework
django
from django.http import HttpResponse
def my_view(request):
return HttpResponse(status=380) # Alternative Service
flask
from flask import Flask
app = Flask(__name__)
@app.route("/endpoint")
def my_endpoint():
return "", 380 # Alternative Service
fastapi
from fastapi import FastAPI
from fastapi.responses import Response
app = FastAPI()
@app.get("/endpoint")
def my_endpoint():
return Response(status_code=380) # Alternative Service
express.js
// Express.js
app.get('/endpoint', (req, res) => {
res.sendStatus(380); // Alternative Service
});
spring boot
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
@RestController
public class MyController {
@GetMapping("/endpoint")
public ResponseEntity<Void> myEndpoint() {
return ResponseEntity
.status(380) // Alternative Service
.build();
}
}
go net/http
package main
import "net/http"
func myHandler(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(380) // Alternative Service
}
ruby on rails
class MyController < ApplicationController
def my_action
head :alternative_service
end
end
asp.net core
// ASP.NET Core Minimal API
app.MapGet("/endpoint", () =>
Results.StatusCode(380) // Alternative Service
);