paint-brush
Axios or Fetch: What Is Better for HTTP Requests?by@thatIITGirl
2,242 reads
2,242 reads

Axios or Fetch: What Is Better for HTTP Requests?

by thatIITGirl1mJuly 11th, 2020
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

Both are capable of making all types of API calls (get, post,put.. etc.) Both are based on Promise API which is native to ES6. Fetch() has a two-step process while handling JSON data. The first makes the actual request and then the second is to call the.json() method on the response. Axios handles it, the way it is expected. Error handling is, Error handling. Logically if.fetch() gets an error it would enter the catch() block and should return but, it eventually executes the next then() in chain.

Company Mentioned

Mention Thumbnail

Coin Mentioned

Mention Thumbnail
featured image - Axios or Fetch: What Is Better for HTTP Requests?
thatIITGirl HackerNoon profile picture
thatIITGirl

thatIITGirl

@thatIITGirl

Node js developer

Learn More
LEARN MORE ABOUT @THATIITGIRL'S
EXPERTISE AND PLACE ON THE INTERNET.
L O A D I N G
. . . comments & more!

About Author

thatIITGirl HackerNoon profile picture
thatIITGirl@thatIITGirl
Node js developer

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite
Scrapbox
Com
Papasearch
Charlesthompson