fetch (javascript native in)
- To fetch a manual data formatting, but axios data is internally formatted
- Method fetch get request data, parameters to be directly connected to the url
- There are three format data fetch processing method
- .json () json format type data, converts json string type objects into json
- .text () formatted text
- .blob () formatted binary data
- If you write post fetch request, there are pit, carrying data according to the official website of the document there is a problem
- fetch post processing
1. Set request header
2. The parameters to carry new URLSearchPrams
axios and fetch the requested data type is not jsonp
with
- axios and fetch are based on the promise asynchronous
- Both have get, post request method, etc.
different
- axios have the results of our request to conduct a repackaged ((Let improved safety); fetch bare no direct exposure data package