About 171,000 results
Open links in new tab
  1. javascript - Accessing http status code constants - Stack Overflow

    Sep 10, 2015 · For node.js you can use the module node-http-status . This is an example: var HttpStatus = require('http-status-codes'); response .status(HttpStatus.OK) .send('ok'); …

  2. How to get HTTP status from JavaScript - Stack Overflow

    Jul 21, 2010 · You will have to use XMLHTTPRequest for getting the HTTP status code. This can be done by making a HEAD request to the server for the required url. Create an …

  3. javascript - Best way to check status code of http response?

    Apr 27, 2020 · The status code is the status property on the response object. Also, unless you're using JSON with your error responses (which some people do, of course), you need to check …

  4. Get the Status Code of a Fetch HTTP Response in JavaScript

    Mar 4, 2024 · Access the status property on the response object to get the status code of an HTTP request made with the fetch method. The response.status property contains the HTTP …

  5. How to get the HTTP status code of the current page in JS

    Jun 17, 2024 · Learn how to get the HTTP status code of the current page using JavaScript. Explore methods including Fetch API, XMLHttpRequest, performance API, and server-side …

  6. Response: status property - Web APIs | MDN - MDN Web Docs

    Mar 13, 2025 · Learn about the Response.status property, including its type, code examples, specifications, and browser compatibility.

  7. A JavaScript library for working with HTTP status codes.

    A JavaScript library for working with HTTP status codes. All status codes are taken from the IANA Status Code Registry. The library works both in the front-end (VanillaJS) and the back-end …

  8. Using the Fetch API - Web APIs | MDN - MDN Web Docs

    Apr 28, 2025 · With the Fetch API, you make a request by calling fetch(), which is available as a global function in both window and worker contexts. You pass it a Request object or a string …

  9. How to ping a server using JavaScript - GeeksforGeeks

    Aug 2, 2024 · In this article, we'll be using Ajax to send a request to the required server and then examining the status code received to find whether the server is running or not. The idea is …

  10. Express res.status() Function - GeeksforGeeks

    Jan 7, 2025 · The res.status() function sets the HTTP status for the response. It is a chainable alias of Node’s response.statusCode. Syntax: res.status( code ) Parameter: This function …

  11. Some results have been removed
Refresh