2xx Success
HTTP 200 OK
The request has succeeded. The meaning depends on the HTTP method used.
When is 200 used?
- GET requests returning the resource
- PUT/POST requests after a successful update
- DELETE requests confirming removal
How to handle a 200 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.comHow to return 200 from your server
Node.js (Express)
res.status(200).json({ message: 'OK' });Python (Flask)
return {"message": "OK"}, 200Go (net/http)
w.WriteHeader(200)Frequently Asked Questions
What does HTTP 200 mean?
200 OK: The request has succeeded. The meaning depends on the HTTP method used.
Is 200 an error?
No. 200 is in the 2xx Success class. Success: the request was received, understood, and accepted.