locked
which web api library to use? RRS feed

  • Question

  • User1034446946 posted

    theres a lot off recommondations for fetch and axios and I have seen others.

    I will mainly be calling web api's which will be returning json

    Sunday, September 8, 2019 2:04 PM

Answers

  • User1034446946 posted

    don't worry gone with axios

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, September 9, 2019 1:00 AM

All replies

  • User1034446946 posted

    don't worry gone with axios

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, September 9, 2019 1:00 AM
  • User61956409 posted

    Hi EnenDaveyBoy,

    Glad to hear that you solved the problem by yourself.

    I will mainly be calling web api's which will be returning json

    Both Fetch API and Axios can help make HTTP requests, when working with .fetch() to get the json object response, we make a request first and then the second is to call the .json() method on the response, but if using Axios, the middle step of passing the results of the http request to the .json() method is not needed. For more comparison between Fetch API and Axios, please check this SO thread.

    https://stackoverflow.com/questions/40844297/what-is-difference-between-axios-and-fetch

    With Regards,

    Fei Han

    Monday, September 9, 2019 5:58 AM