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

  • SEARCH
  • Home
  • 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 118k
  • Answers 119k
  • 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
  • Editorial Team
    Editorial Team added an answer Only by iterating over the rows, as Utaal noted in… May 11, 2026 at 11:41 pm
  • Editorial Team
    Editorial Team added an answer I've always used Jad, but there's also a decompiler called… May 11, 2026 at 11:41 pm
  • Editorial Team
    Editorial Team added an answer HttpWebRequest.AllowAutoRedirect Gets or sets a value that indicates whether the… May 11, 2026 at 11:41 pm

Related Questions

For an ajax app I'm doing, I was using the google local search api
I'm building an Eclipse plugin that talks to a REST interface which uses Basic
I have the following xml file and cannot seem to figure out how to
At my company we're starting to branch into web APIs to access and update

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.