2xx Success

HTTP 206 Partial Content

The server is delivering only part of the resource due to a Range header in the request.

When is 206 used?

  • Resume interrupted downloads
  • Streaming large files in chunks
  • PDF/image range requests

How to handle a 206 response

No error handling is needed. Check that the response body and headers match what your client expects — for example, a 204 response has no body.

Check the status code a URL returns from the command line:

curl -s -o /dev/null -w "%{http_code}\n" https://example.com

How to return 206 from your server

Node.js (Express)

res.status(206).json({ message: 'Partial Content' });

Python (Flask)

return {"message": "Partial Content"}, 206

Go (net/http)

w.WriteHeader(206)

Frequently Asked Questions

What does HTTP 206 mean?

206 Partial Content: The server is delivering only part of the resource due to a Range header in the request.

Is 206 an error?

No. 206 is in the 2xx Success class. Success: the request was received, understood, and accepted.