As I know, HEAD is the same as GET, but without response body. If I request resource that doesn't exist, GET will response with 404 Not Found. What status code should return HEAD request in this case? 200 OK or 404 Not Found?
Should HEAD's response status code be the same as GET's status code?
890 Views Asked by Petr Flaks At
1
There are 1 best solutions below
Related Questions in HTTP
- My get request for http is very slow
- Angular multiple http requests chrome android
- HttpRequestContext vs HttpContext
- Converting curl command to iOS
- getting google contacts using shuttlecloud
- Node.js http.get example
- How can hide url value in php
- Symfony2 - handle HTTP/Entity user access restrictions
- Angular http interceptor responseError doesn't have statusText
- Which of the following hostnames are valid?
- Send Http request at specific time
- Rails - read file from POST request / octet-stream
- Python - Cookies & BeautifulSoup
- Npm requests stopped by home router
- POST Android json data
Related Questions in HTTP-GET
- MarkLogic 8 - After upgrade we are getting 405 Method Not Allowed on a GET
- Calling HttpGet in Background Service but seems doesn't work
- how to set angular controller element using http get return values
- ASP.NET MVC: id not sent back on post or delete to the 'view by id'
- AngularJS-ionic framework http.get error
- $http.get request with multiple $http.get requests inside it not running properly
- How to pass value into GET method in Android Studio?
- Making an HTTP GET request to a REST API endpoint
- How to update a div based on http.get request in Angular 2
- How to get String value from JSON Array?
- No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin is therefore not allowed access
- converting a string stream into pdf and return as a response to the client
- HTTP GET and POST failing on Android
- java sending images over http get doesn't work
- Zend Framework 1 pass parameters using get to the route
Related Questions in HTTP-STATUS-CODES
- http status code for failed email send
- Scrapy encountered http status <521>
- HTTP Status Code Priority and Processing
- PHP header returning Status 301 OK
- Redirect form with 302
- Link sniffing - http get response codes wrong
- HTTP Request failed with status (canceled)
- Can i just check the domain availability by using the HTTP return status code?
- REST API - What to return when search criteria (queryParams) doesn't yield any results
- Retrive HttpStatusCode using webclient and then extract json In it. For use In C# client applications
- Slim PHP Framework API - http statuscodes not changing
- How to findout HTTP status faster?
- Http-source flume into hdfs is not working​.? The status code for the post request is 400?
- Is it correct to return 404 when a REST resource is not found?
- Rest API batch response status
Related Questions in HTTP-METHOD
- Triggering GET method on form submit when POST method is specified
- Should watching/unwatching a forum use get or post http method in rails
- How to specify supported http operation for a resource in json-ld?
- how to enable only GET & POST HTTP method in asp.net
- How to know allowed methods for one route in Symfony2?
- Angular Js 405 DELETE Method Not Alowed
- Should the rest services use only 4 http methods?
- Is it possible to implement the CONNECT HTTP method with the Snap framework?
- Explain and example about 'get', 'delete', 'post', 'put', 'options', 'patch', 'head' method?
- Test Supported HTTP Methods
- web.xml - <http-method> absent
- How do I use my own method with an HttpURLConnection object on Android?
- Understanding HTTP DELETE method in a REST API
- What is difference between HTTP methods GET, POST, PUT and DELETE
- DAViCal and nginx: problem with HTTP method REPORT
Related Questions in HTTP-HEAD
- Unknown reason for Timeout on HTTP HEAD request
- Will an HTTP HEAD request ever be cached by phone / browser
- What is the difference between PING and HTTP HEAD?
- Making HTTP HEAD request with timeout in Ruby
- Should HEAD's response status code be the same as GET's status code?
- Validate curl CURLOPT_HTTPHEADER request on server side
- How to set the Content-Length header and it work in Cassini?
- Prevent duplicate HTTP requests for cachable responses
- Why would a server disallow HTTP HEAD?
- check if file exist in the same URL but not in local server
- Is it possible to make a HEAD request in puppeteer?
- Curl HEAD request returns a last-modified header but Node https.request(..., {method: HEAD},...) does not
- Unreliable HTTP status code when using the HEAD method
- HttpHead in ASP.NET Core
- HttpClient Head request argument always null
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
As you said yourself, the response should be the same except there is no body.
This means that both the status and headers need to be the same as they would be for a
GETrequest.