Axios vs Superagent

后端 未结 2 694
挽巷
挽巷 2021-02-08 19:40

If I use Axios and Superagent to make a call to the same api one after another I get Superagent\'s response first in the console logs in both cases i.e if I call one first than

2条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-02-08 20:35

    I don't really think that it is really speed thing, well sort of. I think it is that Axios is promise based and Superagent is not. They are both asynchronous but since axios waits to resolve the response it gets it appears "slower" than superagent.

    I could be wrong though.

提交回复
热议问题