HTTP

304 Not Modified 응답 모의 테스트

The resource has not been modified since the last request. The client can use its cached copy.

전체 레퍼런스 보기 →

1 HTTP 응답

HTTP 응답
HTTP/1.1 304 Not Modified
Content-Type: application/json
Date: Tue, 25 Feb 2026 12:00:00 GMT

2 curl로 테스트하기

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

3 프레임워크에서 304 Not Modified 반환하기

django
from django.http import HttpResponse


def my_view(request):
    return HttpResponse(status=304)  # Not Modified
flask
from flask import Flask

app = Flask(__name__)


@app.route("/endpoint")
def my_endpoint():
    return "", 304  # Not Modified
fastapi
from fastapi import FastAPI
from fastapi.responses import Response

app = FastAPI()


@app.get("/endpoint")
def my_endpoint():
    return Response(status_code=304)  # Not Modified
express.js
// Express.js
app.get('/endpoint', (req, res) => {
  res.sendStatus(304); // Not Modified
});
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(304) // Not Modified
            .build();
    }
}
go net/http
package main

import "net/http"

func myHandler(w http.ResponseWriter, r *http.Request) {
    w.WriteHeader(304) // Not Modified
}
ruby on rails
class MyController < ApplicationController
  def my_action
    head :not_modified
  end
end
asp.net core
// ASP.NET Core Minimal API
app.MapGet("/endpoint", () =>
    Results.StatusCode(304) // Not Modified
);

더 많은 HTTP 모의 응답 페이지