SIP

จำลองการตอบสนอง 488 Not Acceptable Here

The request was understood but the session description (SDP) is not acceptable. The response may contain a list of acceptable media parameters.

ดูเอกสารอ้างอิงฉบับเต็ม →

1 การตอบสนอง HTTP

การตอบสนอง HTTP
HTTP/1.1 488 Not Acceptable Here
Content-Type: application/json
Date: Tue, 25 Feb 2026 12:00:00 GMT
Content-Length: 66

{
  "error": "not_acceptable_here",
  "message": "Not Acceptable Here"
}

2 ทดสอบด้วย curl

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

3 ส่งคืน 488 Not Acceptable Here ในเฟรมเวิร์กของคุณ

django
from django.http import JsonResponse


def my_view(request):
    return JsonResponse(
        {"error": "not_acceptable_here", "message": "Not Acceptable Here"},
        status=488,
    )
flask
from flask import Flask, jsonify

app = Flask(__name__)


@app.route("/endpoint")
def my_endpoint():
    return jsonify({"error": "not_acceptable_here", "message": "Not Acceptable Here"}), 488
fastapi
from fastapi import FastAPI
from fastapi.responses import JSONResponse

app = FastAPI()


@app.get("/endpoint")
def my_endpoint():
    return JSONResponse(
        content={"error": "not_acceptable_here", "message": "Not Acceptable Here"},
        status_code=488,
    )
express.js
// Express.js
app.get('/endpoint', (req, res) => {
  res.status(488).json({"error": "not_acceptable_here", "message": "Not Acceptable Here"});
});
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(488)
            .body(Map.of("error", "not_acceptable_here",
                         "message", "Not Acceptable Here"));
    }
}
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(488)
    json.NewEncoder(w).Encode(map[string]string{
        "error":   "not_acceptable_here",
        "message": "Not Acceptable Here",
    })
}
ruby on rails
class MyController < ApplicationController
  def my_action
    render json: {"error": "not_acceptable_here", "message": "Not Acceptable Here"},
           status: :not_acceptable_here
  end
end
asp.net core
// ASP.NET Core Minimal API
app.MapGet("/endpoint", () =>
    Results.Json(
        new { error = "not_acceptable_here", message = "Not Acceptable Here" },
        statusCode: 488
    )
);

หน้าจำลอง SIP เพิ่มเติม