Created
May 18, 2018 14:06
-
-
Save marksb/31151164c9b71399288675d7a8017027 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#### Why fetch (from `core/utils/fetch`)? | |
This was originally created to add and extract headers to the requests for authentication purposes. When we moved to the middleware approach it seems that this is just a wrapper around `whatwg-fetch`. As a note - this wrapper isn't really necessary anymore. | |
#### Why `parseResponse`? | |
This was created, in part, due to API issues. Since `500` errors were occuring and responding with `text/html` content type, it was causing errors when we were trying to parse the response. | |
#### Why `apiMiddlware`? | |
We moved to `apiMiddleware` to replace the `fetch` from `core/utils`. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment