0 ratings0% found this document useful (0 votes) 4 views3 pagesAxios Get Started
axios requestor, commonly used for server and client request library. get-started page for documentation.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here.
Available Formats
Download as PDF or read online on Scribd
8124125, 5:04 PM Getting Started | Axios Docs
Getting Started
Promise based HTTP client for the browser and node,js
What is Axios?
Axios is a promise-based HTTP Client for [Link] and the browser. It is isomorphic (=
it can run in the browser and [Link] with the same codebase). On the server-side it
uses the native nodejs http module, while on the client (browser) it uses
XMLHttpRequest.
Features
+ Make XMLHttpRequest from the browser
+ Make http requests from nodejs
* Supports the Promise API
+ Intercept request and response
* Transform request and response data
* Cancel requests
* Timeouts
+ Query parameters serialization with support for nested entries
+ Automatic request body serialization to:
© JSON ( application/json )
© Multipart / FormData ( multipart/form-data )
© URL encoded form ( application/x-ww-form-urlencoded )
+ Posting HTML forms as JSON
+ Automatic JSON data handling in response
+ Progress capturing for browsers and nodejs with extra info (speed rate,
remaining time)
+ Setting bandwidth limits for nodes
+ Compatible with spec-compliant FormData and Blob (including [Link] )
* Client side support for protecting against XSRF
Installing
[Link] 18.8124125, 5:04 PM Getting Started | Axios Docs
$ npm install axios
Using bower:
$ bower install axios
Using yarn:
$ yarn add axios
Using pnpm:
$ pnpm add axios
Using jsDelivr CDN:
Using unpkg CDN:
Prebuilt CommonJS modules for direct importing with require (if your module bundler
failed to resolve them automatically)
const axios = require('axios/dist/browser/[Link]'); // browser
const axios = require('axios/dist/node/[Link]'); // node
[Link] 288124125, 5:04 PM
y
stagram
[Link]
Buy
@& Youtube
Subscribe.
Getting Started | Axios Docs
Buy
Instagram
Buy
Instagram
Next »
Minimal Example
38