Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 74161
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T20:18:53+00:00 2026-05-10T20:18:53+00:00

We have a REST API which clients routinely POST and PUT data to. When

  • 0

We have a REST API which clients routinely POST and PUT data to. When they do this, sometimes they POST data which results in no change on our system. The POSTs and PUTs are well-formed, but they data they’re sending is identical to the data in our database. When this happens, I’ve just found out that we’re returning a 400 HTTP status. Unfortunatly, this means ‘bad request’ as in ‘request could not be understood by the server due to malformed syntax’.

Clearly this is not the case, but I’m told that we’re going to use this since there’s no other appropriate status code. Choices we’ve considered:

  • 304 Not Modified. This, regrettably, is only for GET requests.
  • 204 No Content. Seems close, but forbids an entity-body.

Other choices seem equally bad. We might go with 200 OK and have the relevant information in the XML document we return, but this doesn’t seem very ‘RESTish’. How does the REST world generally handle this?

(Fixed Not Modified response code. Thanks Mkoeller)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T20:18:54+00:00Added an answer on May 10, 2026 at 8:18 pm

    I think it’s perfectly fine to return a 200 OK in that case, the data was correctly processed and the server did what it had to. Because the server processed correctly the data, it should return an OK status code. The fact that it ignored it internally is or should be irrelevant.

    What the server did to the data should not be told to the clients, they should be told what happened to the request (processed ok, error occurred, and the like).

    And if, for some weird reason (I can’t think a valid one, btw), it is of interest to the clients, you have the response to tell them so.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 64k
  • Answers 64k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer This sounds alright to me. If you're using SQLite, you… May 11, 2026 at 10:40 am
  • added an answer The two current answers are wrong: /*/* does not select… May 11, 2026 at 10:40 am
  • added an answer Adapted to Powershell from one of the solutions proposed in… May 11, 2026 at 10:40 am

Related Questions

We have a REST API which clients routinely POST and PUT data to. When
We are trying to implement a REST API for an application we have now.
We have a requirement in project to store all the revisions(Change History) for the
We have a remoting singleton server running in a separate windows service (let's call
We have a Windows Server Web Edition 2003 Web Farm. What can we use
We have a situation where users are allowed to upload content, and then separately
We have a SharePoint list setup with history enabled so the Comments field keeps
We have a whole bunch of DLLs that give us access to our database
We have a service that has some settings that are supported only over net.tcp.
We have a few very large Excel workbooks (dozens of tabs, over a MB

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.