Most voted "http-status" questions
Part of the HTTP response, formed by a 3-digit code being the first of 1 to 5 (defining in which of the 5 classes belongs) and by an expression that summarizes the type of the response, for example, "404 Not Found" when the resource was not found and "200 Ok" when a request is correct, it has been processed smoothly and has a valid response. Use the tag when your question is directly related to the use of one or more status or when you don’t know which to use
Learn more…43 questions
Sort by count of
- 
		39 votes4 answers17554 viewsWhat is the difference between 401 Unauthorized and 403 Forbidden?When designing an application, it is common for me to be in doubt as to which HTTP code to return when a user does not have access to a certain resource: if it is 401 Unauthorized or if it is 403… 
- 
		25 votes3 answers2308 viewsWhat HTTP status should I use for when a POST parameter is missing?I have a form that will be submitted to the server via ajax, using a plugin for this. When the form is not filled in correctly (in case when a mandatory parameter is missing), I want to return a… 
- 
		23 votes3 answers4843 viewsFor a search with no results, should the HTTP response be 404, 204 or 200 with an empty body?When we search for a resource on the server with some type of filter, for example, a user search, a list with the data is returned (in JSON, XML or even already formatted in HTML) But some searches… 
- 
		19 votes1 answer228 viewsWhen and why to use range 1xx status?The range 1xx of HTTP response status codes are informative, the description of the Wikipedia, translated from rfc2068: "Request received, continuing the process. This status code class indicates a… 
- 
		18 votes1 answer3663 viewsWhy does a return with status code 200 return before a 204?I have noticed that every answer from Success (200) there is also an answer No Content (204). I was curious and went to search in MDN on status 200, the only thing that says that the success results… http-statusasked 7 years ago Marconi 17,287
- 
		17 votes5 answers2766 viewsWhat HTTP code should I use when I can’t authenticate to third-party services with login and password provided by the client earlier?I am implementing a service from a website that does the following: My website (A) connects to some external services provided by third parties (B, C and D) using webservices. In fact A is a REST… 
- 
		14 votes3 answers1699 viewsWhat HTTP status returns to an expired token?I have an application where the user can request a token for password recovery. However, I give this token a period of 2 hours. When the token expires, I want to return an error to the client,… 
- 
		10 votes3 answers2440 viewsWould the HTTP 418 "I’m a Teapot" response be valid?A certain API is returning me a status 418 I'm a teapot, I saw that it is part of the protocol HTCPCP. ;,' _o_ ;:;' ,-.'---`.__ ; ((j`=====',-' `-\ / `-=-' The use of this status can be considered… http-statusasked 5 years, 9 months ago Homer Simpson 3,001
- 
		7 votes2 answers2792 viewsWhat status code to use when there is no database record to return on an HTTP request?I own an endpoint that returns a list of products. Therefore, if there is data from this list I set the HTTP status code to 200, and if there is not, I return only a json saying that no record has… 
- 
		7 votes2 answers2558 viewsHTTP status for registered userWhat status should I return to my API if a user tries to register with an existing user name or email in the system? 
- 
		6 votes1 answer468 viewsHow to get the correct HTTP status?I tried to get the error "status" like this: error_page 403 /error.php; error_page 404 /error.php; But $_SERVER['REDIRECT_STATUS'] return 200, already in Apache he return 404 (the expected result).… 
- 
		6 votes2 answers494 viewsDirecting all root traffic to sub folder results in "403 Forbidden" error if you do not have "index.php"The code below works perfectly to direct all website traffic transparently into the folder www: Options -Indexes +SymLinksIfOwnerMatch RewriteEngine on RewriteBase / # Verificar o destino… 
- 
		6 votes2 answers795 viewsWhat is http/ftp 220 status?Contextualizing... when trying to connect to the hosting server, by FTP, always returns the 220 status and, after a few seconds, disconnects by time Being a status of type 2xx is not an error… 
- 
		5 votes3 answers6516 viewsWhat HTTP status code to use to indicate validation failure?When a method in a web API detects that there has been a failure to validate the data of an entity to be added or updated, is there any HTTP code that is standard to be sent? For now I’m using code… 
- 
		5 votes1 answer316 viewsWhat status can I return in an attempt to submit a form without a TOKEN?I’d like to know what the status http I must return to my application if someone is trying to forge a request via form. The application I developed is done in Laravel 4 and I’m using that… 
- 
		5 votes1 answer663 viewsWhat would be the best HTTP response to inform the client that it cannot delete a single record?I have an application where I established the following business rule related to user registration: The user may have multiple addresses linked to him, but it is mandatory that he has at least one… 
- 
		5 votes2 answers767 viewsHow do HTTP response status codes work?I’m redirecting a user to the root route in case they don’t pass a condition and the slim framework asks for an http status for redirection. With this I did not understand exactly how this process… 
- 
		4 votes2 answers1969 viewsHow do I check the status code of the server http response in java?Good morning, you guys. I would like to know how to do in java to check whether the response received from the server was successful or not. Can someone help me with that? 
- 
		4 votes1 answer368 viewsAlternative to http_response_code in versions below php5.4It is possible to get HTTP status in versions prior to PHP 5.4 (http_status_code only supported in PHP5.4+)? I am creating a system of customized error pages, it will not be a system for a specific… 
- 
		4 votes1 answer1056 viewsAjax POST with jQuery and Node.js Express always returning 404: Not FoundI created the route below to accept POST requests, but calls via AJAX to this route are always returning error 404: Not Found. /* Arquivo: integracoes.js */ var express = require('express'); var… 
- 
		3 votes1 answer92 viewsException mapping . NET for HTTP status codesSituation I’m working on one Httpmodule who is responsible for monitoring usage patterns and intercepting and managing untreated exceptions in ASP.NET applications via events BeginRequest,… 
- 
		3 votes0 answers136 viewsMultithreading Crawler problem using jsoupHello, I’m developing a multithreaded Crawler, each job (thread) deals with X sites to analyze certain content with the jsoup lib. The sites are all accessible. The problem is that the final results… 
- 
		2 votes2 answers174 viewsReceiving code 200 when it should be 404I created an ASP.NET MVC 5 application by adding the following code snippets: Web.config <system.web> <customErrors mode="On"> <error statusCode="404" redirect="~/Erro/Erro404"/>… 
- 
		2 votes1 answer140 viewsHow to identify an http (500) error via the Selenium web driver or javascriptI need to build a script that scans certain pages and locate http errors, specific to 500. I thought about making a Selenium script, but I don’t know a command that I can "read" this kind of error.… 
- 
		2 votes1 answer177 viewsHTTP - Correct return typesI have some questions regarding the most appropriate status for each situation to follow: PUT in Object without Id PUT in the URL localhost:8080/users/1 with a JSON without the attribute Id. PUT in… 
- 
		2 votes2 answers466 viewsHow to remove error 401 message from console with Angularjs/Javascript?I get the following error message on my console: POST http://localhost:8080/minhaURL 401 (Unauthorized) I would like to know how to remove this error log from the console, because I’m already giving… 
- 
		2 votes1 answer98 viewsImage upload to Apache2 server - Ionic 3 + PHPBased on a tutorial (http://masteringionic.com/blog/2018-01-23-using-the-html5-filereader-api-and-php-to-upload-images-from-ionic-framework-apps/) I made an application to upload images on an Apache… 
- 
		1 votes1 answer879 viewsHow do I set up apache HTTPS for a specific page and HTTP for the others?I need a specific page to work via HTTPS with a specific certificate. How to configure httpd.conf, httpd-ssl and httpd-vhosts.conf files in apache? has some other file to modify? 
- 
		1 votes2 answers116 viewsWhat is the appropriate http code to respond to the contents of an image?Well, the question is quite straightforward. I want to use PHP to answer the content of an image. However, I would like to know if the http status type will have any impact on the client (for… 
- 
		1 votes1 answer1932 viewsError 502: Bad Gateway - How to resolveWhat’s going on Starting yesterday morning, in a certain part of the site, in the user register to be more exact, many times when trying to perform it, Nginx returns the message of 502 - Bad… 
- 
		1 votes1 answer724 viewsIgnore http error code when using file_get_contentsI’m using file_get_contents to make a request to a url. This request can return an error 422. When that mistake 422 is returned, I need to capture the body, which comes in format JSON. But the… 
- 
		1 votes1 answer176 viewsWhy does Retrofit make an exception when the status code is 204?After a consultation GET only to check if a content exists on the server, the return is 200 (exists) or 204 (there is no). Why does Retrofit trigger the exception below when the server returns the… 
- 
		1 votes2 answers301 viewsConsuming web service wsdl . net framework 2.0When generating the request with all the correct parameters I have error return 307 Temporary redirect. Someone knows tell me what this error represents ? 
- 
		1 votes2 answers136 viewsPython flask Static status 304The flask is returning me the following error: 127.0.0.1 - - [13/Jun/2019 22:55:07] "GET /destino/17 HTTP/1.1" 200 - 127.0.0.1 - - [13/Jun/2019 22:55:07] "GET /static/css/bootstrap/bootstrap.min.css… 
- 
		0 votes0 answers206 viewsBanner Weather Forecast does not load with HTTPSWhen I put the banner code of the site weather forecast (http://www.tempoagora.com.br) on my website that has the HTTPS protocol. Banner does not load. The code that the site generates is this: And… http-statusasked 10 years, 7 months ago Bruno 1
- 
		0 votes0 answers720 viewsGet status code of current requestI have a request made by Jqueryfiledownload that when error occurs the server returns different types of status. I need to act on the client according to these errors. Other than jquery ajax I can’t… 
- 
		0 votes1 answer82 viewsHTTP Status 404 - /Alfresco/testCMISfromJS.htmlI am trying to run an HTML file in Alfresco, which I put inside the folder (directoralfresco)/Tomcat/webapps . Then I tried to run http://localhost:8080/Alfresco/testCMISfromJS.html but I get the… 
- 
		0 votes1 answer108 viewsApache/PHP returning default http statusI am creating a REST api in PHP, and in certain situations return an HTTP status with the specific error message for what occurred, for example, 403 Invalid Access Key rather than simply 403… 
- 
		0 votes0 answers488 viewsConsuming WEB API ASP.NET MVC 4 [ERROR]I have a problem... I put my web api in Ocaweb... But if I use the link in the project, it does not work and returns me "Statuscode: 500, Reasonphrase: 'Internal Server Error', Version: 1.1,… 
- 
		0 votes3 answers1776 viewsHow to show error returned from backend in nodejs in ReactI have a problem showing the error message that came from the backend. I return in the backend: res.status(400). send({error: "User already exists"}); already on the front I would like to display… 
- 
		0 votes1 answer56 viewsWhat "status code" to use when there is no data in the body of a POST request?I am creating an application for the client to upload a file to the server and I would like to know what the Status Code ideal to return if in the request the file or any other important data is not… http-statusasked 5 years, 6 months ago JeanExtreme002 5,663
- 
		0 votes1 answer41 viewsI can’t handle exceptions in the Controller on an ASP.NET APIIn the code below I am trying to change the status of the request when I could not find the Project ID. // GET api/values/5 [HttpGet("{id}")] public Project Get(int id) { try { var project =… 
- 
		-4 votes1 answer113325 viewsHow to fix Forbidden Error 403?Using Mozilla when I try to do a search I get as answer "403 Forbidden". What to do?