【问题标题】:What is difference between axios and fetch in react native? [duplicate]react native 中的 axios 和 fetch 有什么区别? [复制]
【发布时间】:2019-10-18 03:15:15
【问题描述】:

我是 React Native 的新手,所以请你在这个问题中解释更多?

【问题讨论】:

标签: react-native axios


【解决方案1】:

总的来说,它们非常相似,唯一的区别是 axios 更发达一些。 axios 的一些好处:

Transformers: allow performing transforms on data before request is made or after response is received
Interceptors: allow you to alter the request or response entirely (headers as well). also perform async operations before request is made or before Promise settles
Built-in XSRF protection

有关更多信息,您可以查看此讨论https://github.com/axios/axios/issues/314

【讨论】:

    猜你喜欢
    • 2017-04-12
    • 1970-01-01
    • 2016-10-14
    • 2021-10-27
    • 2023-03-04
    • 2016-04-11
    • 2017-01-03
    • 2019-06-21
    相关资源
    最近更新 更多