forked from BolajiOlajide/a_socials
-
Notifications
You must be signed in to change notification settings - Fork 7
REACT Best Practices Making HTTP Requests
Patrick Alvin Luwum edited this page Jun 20, 2018
·
1 revision
Fetch API and axios are the most preferable ways of making http requests. Between those two there are some advantages of using axios library.
They are:
- It allows performing transforms on data before request is made or after response is received.
- It allows 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.