Questions tagged [http-status-codes]

HTTP status codes are a set of standardized codes returned in an HTTP web response. Questions about why a service is (unexpectedly) returning a status code should not use this tag.

For a full list of the status codes see the HTTP 1.1 specification, WebDAV specification, RFC 6585, and the IANA list of status codes.

HTTP status codes have specific meanings which are outlined in the specification that they were created in. They can be used in contexts outside of what the specification states, but must adhere to any conditions that have been established in the specification.

1693 questions
0
votes
1 answer

HttpWebRequest.GetResponse() , does every StatusCode besides 200 throws exception?

Calling GetResponse() on an httpWebRequest, In all my testing i saw that this call throws WebException when the request fail. My question is why is there a StatusCode property on the HttpWebResponse ? It seems that the GetResponse() call will only…
MichaelB
  • 1,332
  • 1
  • 15
  • 29
0
votes
1 answer

I'm returning http error to JQGrid but it is seeing 200 code

Have a web api doing crud, and a mvc front end. In front end controller, this is the edit code for jqgrid: [HttpPost] public JsonResult EditRecipientActivity(RecipientActivity model) { var result = HttpStatusCode.BadRequest; …
BattlFrog
  • 3,370
  • 8
  • 56
  • 86
0
votes
1 answer

Why does Web Server respond "304 Not Modified" when no Etag and no "If-Modified-Since" is in request header

I get back 304 Not Modified from the web server, but in Firebug, the request header doesn't have Etag and doesn't have If-Modified-Since, and I looked at all the header line and there was no datetime info at all, so how does the server know the…
nonopolarity
  • 146,324
  • 131
  • 460
  • 740
0
votes
0 answers

Twitter HTTP Status code with their custom codes

Twitter uses an Error Code message system with their API: https://dev.twitter.com/overview/api/response-codes Look under "Error Codes." I am wondering what HTTP Status code they use for ones that do not correspond to an HTTP status code, for example…
aaron-coding
  • 2,571
  • 1
  • 23
  • 31
0
votes
1 answer

Receiving http status code with grails

I'm trying to receive status code with url calls.(Using grails) def http = new HttpResponseDecorator(url) // Authentication header http.auth.basic(username, password) // Http request method. Pulls out json file …
Tinolover
  • 166
  • 1
  • 5
  • 19
0
votes
2 answers

NSHTTPURLRequest header

I would like to get some information from a website. I have already got the HTML code of the website. However, I would like to get more header information of the website (e.g. http status code) After read the apple library, I found that there are 2…
Questions
  • 20,055
  • 29
  • 72
  • 101
0
votes
1 answer

The right usage of 412 http status code ? (REST)

I would like to know if the HTTP error code 412 is used correctly on our RESTful api. We have one URL which regenerates some data on request, and it has some logic in the server-side to check internally if there is nothing new to regenerate it will…
sarunast
  • 2,443
  • 3
  • 27
  • 37
0
votes
2 answers

AJAX status 200, but responses status is "fail"?

I've been working with Ruby on Rails for the last couple of years, moved to project written in PHP and I can't get one thing straight. I have a jQuery (CoffeeScript) AJAX call, which waits for success or error. The problem is, I'm getting status ok…
Wordpressor
  • 7,173
  • 23
  • 69
  • 108
0
votes
1 answer

What HTTP status code to use when reporting service status through RESTful API?

I am creating a RESTful API that allows a client to check if a specific service is running at the moment. EDIT: The request address will look something like this - /services/123/running The possible return values are: OK (HTTP 200)- the service…
0
votes
1 answer

Laravel Error Page with $app context

I want to create a custom error page for 4xx http status codes (eg. 404, 400, ...). But I need the whole $app context, since I want to display my header, footer and a search field. I have read a lot about the custom solutions in the…
m4lt3
  • 465
  • 2
  • 15
0
votes
0 answers

“Really got content” HTTP status

What HTTP response statuses mean that a client really got desired content? The simple answer would be that all 2XX statuses mean that, but there is one notable exception I'm aware of: 304 NOT MODIFIED. 304 means that a client already has the desired…
Vadim Pushtaev
  • 2,332
  • 18
  • 32
0
votes
1 answer

Which HTTP status code should be returned when page is being edited and therefore not available?

Let's say an URL was public, accessible for all, but right now is being edited and, therefore, is temporary unavailable, but it will be available in the near future. Which HTTP status code should be returned when page is being edited?
Lisandro
  • 141
  • 1
  • 10
0
votes
3 answers

How to setup default success status codes for mapped HttpMethods Spring MVC @RestControllers?

Hi there Spring Gurus, Currently we are annotating every mapped @RestController method with it's own success @ResponseStatus. I wonder, if there is a possibility for a global setup, based on the mapped @RequestMapping method. On Success we'd like to…
Marius Schmidt
  • 633
  • 6
  • 18
0
votes
0 answers

Action Script Constants for HTTP Status Codes

I am calling a Java REST web service from the front end code, which is written in Action Script 3, and then I check the response status, which can be 200, 500 etc. I was wondering if there are some constants defined in as3 for these codes, it would…
user998692
  • 5,172
  • 7
  • 40
  • 63
0
votes
2 answers

Correct status code for no results because of an incorrect request

I've got a GET resource that takes a couple of parameters, let's call them CompanyId and CategoryId This resource can return no results if either the CompanyId or CategoryId are invalid values (Ie: the CompanyId or CategoryId don't exist), or if…
MrBliz
  • 5,830
  • 15
  • 57
  • 81
1 2 3
99
100