Skip to content

Archive

Axios

2 articles
JavaScript 19 Sep 2026 4 min read

Axios GET Uses One Config Object for Params and Headers

axios.get() accepts a request URL and one optional configuration object. Query parameters and HTTP headers are not separate positional arguments; they are properties of that configuration object. That boundary matters because code that treats params and headers as independent config arguments either becomes invalid JavaScript or places data where Axios does not read it. The GET method has one config boundary The call shape is: axios.get(url, config) The request configuration can contain several concerns at once:

JavaScript Updated 02 Sep 2025 2 min read

HTTP Requests in JavaScript with Axios

Axios is a popular promise-based HTTP client for browsers and Node.js. It provides a compact API for requests, JSON handling, interceptors, timeouts, custom instances, and request cancellation. This guide uses the DummyJSON API to demonstrate common CRUD-style requests. 1. Install Axios With npm: npm install axios For a simple browser page, you can also load a CDN build: