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.

1525 questions
0
votes
1 answer

GRAILS: Inconsistent handling of 500 status code on seperate WebLogic 10.3 instances

I've got a simple Grails app (1.3.7) in which I'm testing exceptions and returning specific HTTP status codes to the client. I've disabled the default "500" (view: '/error') in URLMappings to prevent Grails from rendering the response using the…
raffian
  • 28,859
  • 25
  • 95
  • 164
0
votes
1 answer

Wireless Authentication Page iOS app

I'm not really sure how to word this exactly, so hopefully someone can make sense of it. I've been working on an iPad app that syncs files from a server to your iPad and lets you build presentations with the various files. The corporation I'm…
btomw
  • 1,698
  • 16
  • 22
0
votes
1 answer

App Engine 401/403 Status Codes Not Working on WebApp2

I am trying to raise a 401/403 status for when a user attempts to access something they don't have privileges to. I used the Webapp2 Exceptions example which generates the proper error codes for 404/500 "natural" events. Such as going to…
Mark Finch
  • 776
  • 4
  • 16
0
votes
1 answer

automatically redirect user to login page using error code

I have several web services that are being called using AJAX requests from Asp.Net page. If the user's authorization fails, i want to redirect him to the login page. The problem i am facing is i have to manually redirect the user in the errorHandler…
Asdfg
  • 9,239
  • 21
  • 82
  • 151
0
votes
1 answer

Setting custom HTTP response headers in LiteSpeed with PHP

I'm trying to set a custom HTTP 1.0 status code in order to return more descriptive error messages via AJAX (using jQuery). In PHP I have something like: header( 'HTTP/1.0 909 Hello World' ); exit; This works as expected on my development…
paperclip
  • 2,080
  • 6
  • 26
  • 35
0
votes
1 answer

REST: Which HTTP-status-codes?

I have to handle some client requests to my server using rest. The client makes a request sending an ID and I want to return suitable http-error-codes in case the ID is invalid doesn't exist But unfortunately I'm not sure about the right code.
Evgenij Reznik
  • 16,046
  • 33
  • 87
  • 157
0
votes
2 answers

How to determine status code of request

How can I check the status code of a request? I want to check what kind of redirects were used to access a page. For response objects I would use *response.status_code*
hoju
  • 24,959
  • 33
  • 122
  • 169
0
votes
1 answer

Rest API Returning HTTP Status Code

I have a scenario where my API application contacts external datasources and for this particular example, my API requests a list of colours from the external datasource. Sometimes the datasource doesnt have these colours and returns a plain text…
gdp
  • 7,194
  • 10
  • 36
  • 60
-1
votes
0 answers

Why is the output of my code always Status Code 429

I'm trying to make a code that checks the username availability of Instagram.com. If I run the code I always '429' as output. I know this means that there are too many requests in a short period of time, but why does this happen, as I've never ran…
-1
votes
1 answer

How to capture the status code of an IActionResult Method return in a variable C#

I have the following method: public IActionResult DoSomeThing() { try { Some code... } catch (Exception) { return BadRequest(); } return Ok(); } I have…
-1
votes
1 answer

Setting up a status code for a Response Entity

I have the following response: noResultsResponse.setMessage("No available models"); return ResponseEntity.status(404).body(noResultsResponse); This works and returns 404 with the correct message. But when I try to use a different status code, for…
A.J
  • 1,022
  • 4
  • 16
  • 41
-1
votes
1 answer

What status code should server respond with when status of completed asynchronous DELETE operation is requested?

Assume server responds with 202 ACCEPTED to DELETE request and sets Location header to \status\1, where progress can be tracked. While the request is being processed, 200 OK is returned for GET \status\1 with some info in response body. What should…
Gorionovic
  • 175
  • 2
  • 8
-1
votes
1 answer

django-rest-framework: Handling business logic and what to return?

In my API a one can submit "Parent" with 1 child. This is the common use case. You always enter at least one child when entering parent. This is the same on the UI. There can be the case where the user will want to enter a duplicate parent, eg. it…
beginner_
  • 6,371
  • 18
  • 60
  • 112
-1
votes
1 answer

Trying to test some url addresses is working or not with python request but getting errors

I'm trying to learn the test some internet addresses with python request and expecting some outputs (like 200 or 404). But i get errors which i couldn't figured out. I'm also open to any advice for my purpose. import os , sys , requests from…
-1
votes
1 answer

Using Requests for mixture of URLs in Python 3.x

I have a .txt file that contains a list of URLs. The structure of the URLs varies - some may begin with https, some with http, others with just www and others with just the domain name (stackoverflow.com). So an example of the .txt file content…
thefragileomen
  • 1,439
  • 7
  • 22
  • 36
1 2 3
99
100