HTTP Requests in JavaScript

Making network requests is a crucial part of most web applications. This snippet collection introduces core concepts related to HTTP requests, as well as how to make them in JavaScript.

  • HTTP get

    Makes a GET request to the passed URL.

    JavaScript, Browser · Oct 19, 2020

  • HTTP post

    Makes a POST request to the passed URL.

    JavaScript, Browser · Oct 19, 2020

  • HTTP put

    Makes a PUT request to the passed URL.

    JavaScript, Browser · Oct 19, 2020

  • HTTP delete

    Makes a DELETE request to the passed URL.

    JavaScript, Browser · Oct 19, 2020

  • Common HTTP status codes Cheat Sheet

    Familiarize yourself with the most common HTTP status codes with this handy cheatsheet.

    Web development · Jun 12, 2021

  • What is CORS?

    CORS (Cross-Origin Resource Sharing) trips up many developers, but it's pretty easy to wrap your head around.

    JavaScript, Browser · May 7, 2023