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
-1
votes
2 answers

How To Check HTTP status of a list with url's using python3?

This is My Code import requests import sys import time while True: try: lists = open("master1.lst") for line in lists: time.sleep(2) r = requests.get(line) print(r.status_code(line)) …
-1
votes
1 answer

REST Response after updating a resource resulting in a location change

Let's say I have a user resource (/users/{username}) and the client uses PUT to update the username. In this case the location of the resource changes (because username is the ID). That's not idempotent, because you can't perform the same request a…
Melkor
  • 193
  • 1
  • 11
-1
votes
1 answer

how to get a redirect with HTTP POST

I try to Login at a website with a HTTP POST. It doesn´t work, I get the status Code 200 instead of 303. Which mistakes could be the reason for that?
-1
votes
1 answer

Which HTTP Status code should indicate failed to carry out some code due to invalid input?

I have a POST request that require a user id. If that user id is found, then everything is successfully is carried out and the default http code is returned (i.e. 200). If the user id is not found, what should I return? Non of the 4xx seem to…
ILovePHP
  • 93
  • 2
  • 22
-1
votes
1 answer

Appropriate HTTP Status Code for POST to create resource exceeding the limit

I have been playing with a REST API. I've found a bug, my POST request used to get response with HTTP-401 code. Even though, the resource was created. That's not how it should work. That made me think that this API was not the greatest API in the…
Pijotrek
  • 1,709
  • 1
  • 12
  • 23
-1
votes
1 answer

Rest Api Http Status codes

Should I use internal http status code like twitter or use the standard http status codes internal Http status code example: 737 refers to 404 or should I use 404 and what if I had a lot of responses which return a 404 but with different messages?
tyehia
  • 237
  • 5
  • 15
-1
votes
1 answer

HTTP status code for associating resources

Suppose I have 2 resources (models) in my service: Degree, Course. When a user sends a post request to the rest API https://example.com/degrees/degreeId/courses with data like [courseId => 2] It associates Degree with id 1 to a Course with id 1.…
Mehrdad Shokri
  • 1,601
  • 1
  • 23
  • 38
-1
votes
1 answer

Why is HTTP status code 451 cacheable by default?

I understand that some HTTP status codes are cacheable by default. From RFC 7231: 6.1. Overview of Status Codes Responses with status codes that are defined as cacheable by default (e.g., 200, 203, 204, 206, 300, 301, 404, 405, 410, 414, and 501…
ShivanKaul
  • 505
  • 1
  • 6
  • 21
-1
votes
2 answers

What's the right HTTP status code when REST resource isn't there?

I'm a bit confused on HTTP status code. Let's say someone calls an endpoint like .../person/15 but there isn't actually a person with identifier 15. I was previously returning a 412, but as I read that status code closer that's supposed to be…
Gargoyle
  • 7,401
  • 10
  • 55
  • 99
-1
votes
2 answers

What HTTP status fits a "3rd party authentication required" condition?

We have a form submit in our application that requires a 3rd party authentication (through SMS) for some cases. What HTTP code would be ideal for this situation that can be described as: "The form might or might not be fine, but we need you to first…
nikjohn
  • 16,079
  • 9
  • 45
  • 78
-1
votes
1 answer

Unable to seek HTML5 video in spring mvc

I have two projects that plays mp4 video pure html (static html files) Spring MVC application. Both of above projects are deployed in Tomcat 8. When I access the html project using below URL: http://localhost:8080/videoplayer/index.html The page…
-1
votes
1 answer

Perl CGI with HTTP Status Codes in RESTful api

I have the following validation in a CGI script that will check for the GET method and return a 405 HTTP status code if the GET method is not used. Unfortunately it is still returning a 200 Status OK when using POST or PUT. my ($buffer); # Read in…
npavan063
  • 33
  • 5
-1
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
  • 29
  • 1
  • 3
-1
votes
1 answer

PHP header returning Status 301 OK

I have this simple PHP code running on a 64 bit linux server featuring PHP 5.4.40: Any time I connect to this page I get a strange status code: 301 OK I…
DarioDF
  • 311
  • 1
  • 10
-1
votes
1 answer

undocumented http status codes in apache log files

I am working on a Grails application which uses Apache as front end and a Tomcat server to run the application. In order to check for people that are logged in I send, via Ajax, a signal that generates a response from the clients every minute when…
serafim
  • 65
  • 1
  • 9
1 2 3
99
100