Home > Web Front-end > Front-end Q&A > Why doesn't vue use ajax

Why doesn't vue use ajax

hzc
Release: 2020-06-12 13:40:17
Original
5101 people have browsed it

Why doesn't vue use ajax

Why vue does not use ajax but axios:

axios is a Promise-based HTTP client for browsers and nodejs. It is essentially an encapsulation of native XHR. , except that it is an implementation version of Promise, conforms to the latest ES specification, and has the following characteristics:

  1. Create XMLHttpRequest from the browser

  2. Support Promise API

  3. The client supports preventing CSRF

  4. Provides some interfaces for concurrent requests (important, facilitates many operations)

  5. Create http requests from node.js

  6. Intercept requests and responses

  7. Convert requests and Response data

  8. Cancel request

  9. Automatic conversion of JSON data

Recommended tutorial: 《js tutorial

The above is the detailed content of Why doesn't vue use ajax. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
vue
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template