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
- Handling both JSON and form values in POST request body with unknown values in Golang
- Why can't I use PUT requests?
- nginx set up reverse proxy from subfolder to a port
- Async Web Server RP2040 returning ERR_CONNECTION_REFUSED?
- Getting `FormatException: Missing extension byte (at offset 6)` exception for accessing `response.body` from a server deployed in Vercel
- Retrieving list of values from MYSQL data base based on input value(LARAVEL 10 )(GET HTTP METHOD)
- Unable to add request headers via CHttpFile - C++/MFC
- Why do we call all http services 'Web Api/Web Service'?
- How to correctly read POST REQUEST body on ESP32?
- on linux gitclone issue remote server error showing fatal error with proxy n port
- Elasticsearch - cascading http inputs from Airflow API
- How to clean the html pages opened in a session?
- UTF-8 is not a valid encoding name
- I dont get the Result i expected when i want to get my Telegram Chatbot id
- NextJS 14 SSE with TransformStream() sending messages in a single response
Related Questions in HTTP-GET
- Async Web Server RP2040 returning ERR_CONNECTION_REFUSED?
- Standalone webserver to serve HTTP GET requests
- What the error "StatusCode cannot be set because the response has already started" in ASP.NET does mean?
- Having trouble downloading content with requests
- AT Commands HTTP request to JSON source with status 200 but response that I get is incomplete (just some part of Response I received)
- Upon submitting a html form, method POST an uncalled GET request follows causing an error in my node JS http server, why is this redirect happening?
- How can I download an url source html to a string in autohotkey v2
- Test with Postman look for a specific item in an array of objects in a response
- Http request caching not working in angular 17
- Retrieving Courses Taught by a Teacher using C# and MySQL
- Getting the HTTP error 504 (Gateway timeout) with Node.js and Kong API Gateway on EC2 instance
- What is the correct way to send a large parameter to the GET method of a REST API?
- How to use TIdHTTP to get json dynamically in code with Delphi?
- Flutter, converting json into list issue: making listview, futurebuilder from data from http.get
- How to save the random variable so that I can use it for POST and GET
Related Questions in HTTP-STATUS-CODES
- Polly v8 - Retrying specific status codes using the PredicateBuilder
- How repeat a proxy server with a checksite after a failed
- How to handle 4xx status codes in auto-tests
- HttpStatusCode in Spring Boot 3
- What is causing my python script using Google APIs to throw a status code 3 & 6?
- HTTP response code when trying to associate an item with another but is already associated
- How does HTTP redirect work with HTTP methods?
- How to return status code 200 instead of 403 the default URL of my asp net framework application
- How to get status_code from an exception object
- appropriate HTTP status code for non-existent resources in REST API?
- axios give me error (POST /api/v1/users/token/refresh/ HTTP/1.1" 401 65) , How solve it?
- Does HTTP have a "not ready yet" response code?
- How to access http status in Azure Function v4
- Http Status must not be null error how to solve that error
- When loading an image in JavaScript fails, how can you retrieve the specific error or HTTP status codes?
Related Questions in HTTP-METHOD
- Should i use GET or POST for request with body in DRF?
- Which HTTP method is correct for RPC over HTTP triggering asynchronous action eventually changing server status?
- Why django-admin uses POST to change password?
- What HTTP method should a route have if it's for create_or_delete
- Which url name should be used for api performing the membership withdrawal function
- Why does it return status code 405 instead of 401 unauthorized?
- how to remove "Request method 'GET' not supported' error from the screen in java
- No data added to MongoDB database collection on POST request through Postman
- How do I properly pass an group ID parameter into the GroupMe API
- Handle HEAD request with CefSharp
- Best Practices for retrieving data in MVC: Concerns about Using POST for Retrieval and Token Handling
- How to access the HTTP method within a Ballerina request interceptor
- I am getting casting exception while using delete .method of HTTP
- Does Google Cloud Run allow non-standard HTTP methods?
- Thunderclient api testing get error:Cannot get /api/users data
Related Questions in HTTP-HEAD
- Why does this HTTP head request not work in Excel VBA?
- The HTTP HEAD request is returning a 404 Not Found error
- Curl HEAD request returns a last-modified header but Node https.request(..., {method: HEAD},...) does not
- Is it possible to make a HEAD request in puppeteer?
- check if file exist in the same URL but not in local server
- What does 'requests.head()' do in python requests?
- Unreliable HTTP status code when using the HEAD method
- C# soap invokation are generating HEAD request and external server are blocking. How to remove these?
- Google Storage HEAD response missing content-length
- Prevent duplicate HTTP requests for cachable responses
- Why does ASP.NET Core routing result in exceptions for HEAD requests on Azure?
- Add support for [HttpHead] and [HttpGet] in MVC controller method
- Why shouldn't we allow body in a GET or HEAD request?
- How do I make a HTTP HEAD request using requests?
- Validate curl CURLOPT_HTTPHEADER request on server side
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 # Hahtags
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.