200 OK - HTTP | MDN (2024)

The HTTP 200 OK successful response status code indicates that a request has succeeded. A 200 OK response is cacheable by default.

A 200 OK response has a different meaning and format depending on the HTTP request method. Here's how they vary for different methods:

  • GET: A resource was retrieved by the server and included in the response body.
  • POST: An action succeeded; the response has a message body describing the result.
  • HEAD: Identical to GET, except there is no message body.
  • TRACE: The response has a message body containing the request as received by the server.

Although possible, successful PUT or DELETE requests often do not result in a 200 OK response. It is more common to see 201 Created if the resource is uploaded or created for the first time, or 204 No Content upon successful deletion of a resource.

Status

Examples

Receiving a 200 OK for a GET request

In this example, a successful GET request to https://example.com returns a 200 OK response. The response includes representation headers and a message body with the HTML content:

http

HTTP/1.1 200 OKAccept-Ranges: bytesAge: 294510Cache-Control: max-age=604800Content-Type: text/html; charset=UTF-8Date: Fri, 21 Jun 2024 14:18:33 GMTEtag: "3147526947"Expires: Fri, 28 Jun 2024 14:18:33 GMTLast-Modified: Thu, 17 Oct 2019 07:18:26 GMTServer: ECAcc (nyd/D10E)X-Cache: HITContent-Length: 1256<!doctype html><!-- HTML content follows here -->

Receiving a 200 OK for a POST request in form submission

Assuming a form exists to send data to an endpoint for managing subscriptions at http://example.com/subscribe. A POST request to subscribe a user may look like the following:

http

POST /subscribe HTTP/1.1Host: example.comContent-Type: application/x-www-form-urlencodedContent-Length: 50name=Brian%20Smith&email=brian.smith%40example.com

In this example, a response with a 200 OK status could look like this:

http

HTTP/1.1 200 OKContent-Type: application/json{ "message": "User subscription pending. A confirmation email has been sent.", "subscription": { "name": "Brian Smith", "email": "[email protected]", "id": 123, "feed": "default" }}

Specifications

Specification
HTTP Semantics
# status.200

See also

200 OK - HTTP | MDN (2024)
Top Articles
UEFI, Legacy BIOS, and UEFI-Preferred boot modes - Elastic Compute Service
Azure Monitor vs Grafana | What are the differences?
What Did Bimbo Airhead Reply When Asked
Prosper TX Visitors Guide - Dallas Fort Worth Guide
Do you need a masters to work in private equity?
Lycoming County Docket Sheets
Costco in Hawthorne (14501 Hindry Ave)
Roblox Character Added
Fire Rescue 1 Login
Ktbs Payroll Login
Nier Automata Chapter Select Unlock
104 Whiley Road Lancaster Ohio
Mills and Main Street Tour
Nutrislice Menus
Wicked Local Plymouth Police Log 2022
U Break It Near Me
Everything you need to know about Costco Travel (and why I love it) - The Points Guy
Rimworld Prison Break
Plaza Bonita Sycuan Bus Schedule
PCM.daily - Discussion Forum: Classique du Grand Duché
Which Sentence is Punctuated Correctly?
Hannaford Weekly Flyer Manchester Nh
Barista Breast Expansion
Pawn Shop Moline Il
fft - Fast Fourier transform
Top 20 scariest Roblox games
Buhl Park Summer Concert Series 2023 Schedule
130Nm In Ft Lbs
Rainfall Map Oklahoma
Gridwords Factoring 1 Answers Pdf
Wake County Court Records | NorthCarolinaCourtRecords.us
Where Can I Cash A Huntington National Bank Check
Metro 72 Hour Extension 2022
4083519708
Etowah County Sheriff Dept
Myanswers Com Abc Resources
Hellgirl000
The Banshees Of Inisherin Showtimes Near Reading Cinemas Town Square
Craigslist Mexicali Cars And Trucks - By Owner
Nsav Investorshub
Simnet Jwu
Updates on removal of DePaul encampment | Press Releases | News | Newsroom
Craigslist Farm And Garden Reading Pa
Coroner Photos Timothy Treadwell
Strange World Showtimes Near Century Stadium 25 And Xd
N33.Ultipro
The Complete Uber Eats Delivery Driver Guide:
Turok: Dinosaur Hunter
Theater X Orange Heights Florida
O'reilly's On Marbach
Les BABAS EXOTIQUES façon Amaury Guichon
Latest Posts
Article information

Author: Nathanial Hackett

Last Updated:

Views: 5884

Rating: 4.1 / 5 (72 voted)

Reviews: 87% of readers found this page helpful

Author information

Name: Nathanial Hackett

Birthday: 1997-10-09

Address: Apt. 935 264 Abshire Canyon, South Nerissachester, NM 01800

Phone: +9752624861224

Job: Forward Technology Assistant

Hobby: Listening to music, Shopping, Vacation, Baton twirling, Flower arranging, Blacksmithing, Do it yourself

Introduction: My name is Nathanial Hackett, I am a lovely, curious, smiling, lively, thoughtful, courageous, lively person who loves writing and wants to share my knowledge and understanding with you.