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

Map Database exception to Http status code

When I try to delete an entity in my database I get a ForeignKey Constraint Exception. I expect that exception, handle it on the server but also want to handle it on the client. What status code should I use to say: You can not delete this entity…
Pascal
  • 12,265
  • 25
  • 103
  • 195
0
votes
1 answer

How do I create a Rewrite Rule in IIS to temporarily conceal all PDF files?

I've got some PDF files sitting out on a web server, and for the time being I would like to hide them (i.e. have them return 404s). Can this be accomplished in the web.config file with a Rewrite Rule? In Apache you can do this with something like…
soapergem
  • 9,263
  • 18
  • 96
  • 152
0
votes
1 answer

Get http status code in node.js

So, i'm trying to get the http status code of an URL that i pass to the funcion. so far i've used the request module but the problem is that request fetches all the content of the given URL and if the content is a big amount of data it's slow, but i…
kobim
  • 23
  • 1
  • 8
0
votes
1 answer

How to parse HTTP status codes in Node?

I'm using an API library in Node that doesn't return the status code of the HTTP response. However, it does return the response headers, which look like this: { ... status: '200 OK', ... } Is there any Node library I can use to parse the status…
James Ko
  • 32,215
  • 30
  • 128
  • 239
0
votes
2 answers

What is the HTTP status code to return when input data is missing?

I have written a REST API in nodejs. I want to send HTTP status codes on various events. For example when data is returned I send HTTP code 200. What is the status code to return when the input data is missing?
Magedev12345
  • 39
  • 2
  • 3
0
votes
1 answer

HTTParty with proxying raises 'wrong status line'

This is my proxy credentials, and this will successfully connect to the server: ❯ ssh uuuser@aaaddress -p 22 uuuser@aaaddress password: pppassword Now I'm trying send request through this proxy with…
Harvordey
  • 3
  • 1
0
votes
1 answer

What is the most appropriate HTTP status code for flooding?

Which HTTP status is the most appropriate when user performs actions too fast (floods) or spams it? I believe it's one of 4XX family, but which one?
Robo Robok
  • 21,132
  • 17
  • 68
  • 126
0
votes
1 answer

How to retrieve error message from an AJAX error callback in Grails?

I am sending the following AJAX request : $.ajax({ type: 'POST', data: $(this).parents('form:first').serialize(), url:'/myapp/comment/saveOrUpdate', success: function(data,textStatus) {insertNewComment(data)}, error: function(xhr, textStatus,…
fabien7474
  • 16,300
  • 22
  • 96
  • 124
0
votes
0 answers

Web API Response Status Code

I have a method in Web API. [HttpGet] [HandleException("Unable to get Sections")] [Route("Sections")] public IHttpActionResult Sections() { var data = directoryDataService.Sections(1); if (data != null &&…
SharmaPattar
  • 2,472
  • 3
  • 21
  • 23
0
votes
0 answers

Getting HTTP status code from a POST request in WSO2 API

I've been writing an API for a project I'm working on and I've written a resource that takes a POST request, containing the type of the request and the url of the API, for example: { "test":{ "type":"DSS", …
Olly John
  • 366
  • 5
  • 20
0
votes
1 answer

Symfony FOSRestController Empty Response

I have put method and I want after logic have some response "Projects successful update" and I use statusCodes when number error and description but I have 204 No Content, when my action done. But when return "update old project"; but this is…
shuba.ivan
  • 3,824
  • 8
  • 49
  • 121
0
votes
2 answers

Handle an unavailable page (statusCode)

I'm currently checking the status code of the current page with this code : $.ajax({ type: 'HEAD', url: window.location.href, success: function() { console.log("Ok"); }, error: function() { console.log("error"); } }); The page exists if…
Kureb
  • 76
  • 6
0
votes
0 answers

debugging a mysterious 508 (Loop Detected) error

I'm getting a server error (508 Loop Detected) although I don't see anything that I think could cause such a loop. I've done some reading, but couldn't find much information on that and I would really appreciate if someone shed some light on…
Uzi
  • 2,436
  • 13
  • 13
0
votes
1 answer

XmlHttp Request status 0, localhost issues (javascript, ajax, php) help

I am using xampp to test my codes. I am using dreamweaver live view. In live view, and return a xmlhttp.status code of 200 and echo outputs. But when I try to view it in IE or FF, the status code is 0, and no output. I read that this seems to be…
jamex
  • 581
  • 2
  • 7
  • 12
0
votes
1 answer

How many HTML error pages should I make?

I am currently developing my website and have added some custom error pages, namely for HTTP 404 and 500. Obviously there are many more error codes than that, but these two are the most common. What I am wondering is whether there is any rule of…
Ramsay Smith
  • 1,098
  • 13
  • 30
1 2 3
99
100