http-status-codes Questions

5

Solved

All I want to do, is send a 404 status code from PHP - but in a generic fashion. Both Router::statusCode(404) and Router::statusCode(403) should work, as well as any other valid HTTP status code. ...
Microdot asked 25/1, 2011 at 18:15

4

Solved

I am building an app in which I am trying to build my own logging system for each request. For each request, I'd like to log the timestamp, the method used, the route, and finally the response cod...
Strapped asked 27/6, 2018 at 9:1

5

Solved

Is it a normal occurrence for an HTTP GET Request to have a response with status code 204 - No Content? Like, is this semantically correct concerning what an HTTP GET is supposed to accomplish? I k...
Glendon asked 9/10, 2012 at 20:16

4

Solved

I have an WebApi Controller written in ASP.NET Core and would like to return a custom HTTP status code along with custom content. I am aware of: return new HttpStatusCode(myCode) and return...
Mastrianni asked 14/11, 2016 at 13:37

3

Project: ASP MVC 4 running under .net 4.0 framework: When running an application under VS 2010 express (or deployed and running under IIS 7.5 on my local machine) the following (pseudocode) result...
Coronach asked 19/6, 2013 at 4:42

4

Solved

I have an HttpHandler with the following code: using System; using System.Web; using Company.Cms; using Company.Web.Handlers.Console; namespace Company.Web.Handlers { /// <summary> /// S...
Pictogram asked 22/7, 2010 at 13:17

2

Solved

I am developing RESTful APIs, I have implemented token-based authentication, where token digest is prepared using time-stamp. Now when request comes to API server, I am checking if the supplied tim...
Posterior asked 6/5, 2015 at 13:37

1

I want to return status code different from 100 <= self.status_code <= 599, as written in Django's HttpResponseBase class. Is there are any easy way to bypass this restriction?
Hyperopia asked 8/9, 2020 at 21:52

2

Solved

The definition of the 502 Bad Gateway status code is: The server, while acting as a gateway or proxy, received an invalid response from the upstream server it accessed in attempting to fulfill t...
Heartbeat asked 27/3, 2016 at 2:47

2

LinkedIn Consumer Support asked me to add this question here for #LinkedIn developpers to answer this. I have seen there are multiple questions about this 999 status code, but they are all API rel...
Benadryl asked 14/9, 2017 at 8:22

3

Is there a way to handle http status code 422 gracefully. I am looking for the best practice here. I know that HttpStatusCode is an enum so what i tried is this, HttpStatusCode Unprocessable = (H...
Madelinemadella asked 21/4, 2015 at 3:27

5

Solved

Scenario: A POST request is sent to process an order that will result in data retrieval from an external datasource. There are three possible results: The datasource returned data for the reque...
Ectomy asked 7/3, 2012 at 2:51

6

Solved

I want to simulate a 404 error on my Express/Node server. How can I do that?
Malamute asked 5/12, 2011 at 23:15

3

Solved

I want to know what is the ideal HTTP status code an API should return when a user's license has reached? Initially I was thinking its 402 (Payment Required) but this is not my scenario. My case i...
Idle asked 30/8, 2016 at 7:30

5

Solved

In controller I create json array. If I return List<JSONObject> it is ok: @RequestMapping(value="", method=RequestMethod.GET, produces=MediaType.APPLICATION_JSON_VALUE) public @ResponseBody ...
Outsert asked 11/10, 2014 at 22:55

5

Solved

I’ve got a situation with a large internal corporate web based application running ASP.NET 3.5 on IIS6 generating 401 “Unauthorised” responses followed by 200 “Ok” responses (as profiled by Fiddler...
Sheba asked 29/3, 2009 at 5:16

12

Please tell me the steps or code to get the response code of a particular URL.
Brita asked 24/6, 2011 at 12:32

4

Solved

Let's say we have an online shop and receive a valid request of updating some order. The request is valid by itself, but let's say that the order has an expiration time, and it has already expire...
Lustre asked 29/3, 2018 at 12:12

14

Solved

I'm writing a REST web app (NetBeans 6.9, JAX-RS, TopLink Essentials) and trying to return JSON and HTTP status code. I have code ready and working that returns JSON when the HTTP GET method is cal...
Wilmot asked 14/1, 2011 at 1:45

3

What HTTP status code should I return when a client posts bad data (e.g. a string when integer was expected)? I've been using 400 Bad Request, but as I read over the HTTP docs that seems more appl...
Avogadro asked 1/9, 2009 at 20:39

7

Solved

I know that status code 418 was defined as a April Fools' joke, and "is not expected to be implemented by actual HTTP servers" as is stated on Wikipedia. But I would be interested if any of ...
Woadwaxen asked 3/6, 2014 at 14:37

5

Solved

Is there a way of converting numeric http status codes (i.e. 404,403,500,...) to their display names (Not Found, Forbidden, Internal Server Error,...) ? If it helps anything, I am using AngularJS ...
Durham asked 3/12, 2012 at 15:33

4

Solved

I have a health check endpoint at /status that returns the following status codes and response bodies: Healthy - 200 OK Degraded - ? Unhealthy - 503 Service Unnavailable What should the HTTP st...

8

Solved

The HTTP/1.1 specification (RFC 2616) has the following to say on the meaning of status code 400, Bad Request (§10.4.1): The request could not be understood by the server due to malformed synta...
Protozoology asked 24/1, 2011 at 11:0

1

Does someone ever use HttpStatus.IM_USED (226 - IM Used), and in which case or situation?
Starobin asked 20/11, 2018 at 20:17

© 2022 - 2024 — McMap. All rights reserved.