marklogic-community / grove

Grove, a toolkit full of tooling, templates, and other resources that help with building UI applications on top of MarkLogic.
https://marklogic-community.github.io/grove/
Other
5 stars 1 forks source link

Document use of 'fetch' for network calls #24

Open patrickmcelwee opened 5 years ago

patrickmcelwee commented 5 years ago

We use the fetch API for network calls in Grove. This should be documented, so that developers know to use fetch for any network calls that they write.

This is particularly important in the React stack, because the application overrides the global fetch() in order to detect 401s and log out the current user.

When using fetch, it is important to include the following option:

{credentials: 'same-origin'}