Home  >  Article  >  Web Front-end  >  Why doesn't vue use ajax

Why doesn't vue use ajax

hzc
hzcOriginal
2020-06-12 13:40:175062browse

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!

Statement:
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