Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alterx/hoodie-plugin-react-native-server
Quickly integrate Hoodie Server with React Native.
https://github.com/alterx/hoodie-plugin-react-native-server
hoodie react-native
Last synced: 13 days ago
JSON representation
Quickly integrate Hoodie Server with React Native.
- Host: GitHub
- URL: https://github.com/alterx/hoodie-plugin-react-native-server
- Owner: alterx
- Created: 2017-07-06T19:43:21.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-07-06T20:16:06.000Z (over 7 years ago)
- Last Synced: 2024-09-25T23:29:14.636Z (about 2 months ago)
- Topics: hoodie, react-native
- Language: JavaScript
- Homepage:
- Size: 78.1 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Hoodie Server integration with React Native
Integrate Hoodie Server with React Native.## Motivation
Long story short, when using React Native and making a request to the Hoodie Server, Android somehow adds a media type parameter to the `Content-Type` header `(charset=utf-8)` and, since Hoodie follows the http://jsonapi.org/format/ this effectively breaks requests from Android clients (iOS works fine).
This plugin is basically my first attempt for a hapi plugin that "cleans up" the `Content-Type` header allowing Android requests to get in. I'm working on a project that will use this so expect updates and fixes if I find something else that's broken when integrating RN + Hoodie.
See https://github.com/hoodiehq/hoodie/issues/732 for further details.
## Usage
Just run
```
npm install hoodie-plugin-react-native-server
```in your already existing Hoodie project and add
```
"hoodie": {
"plugins": ["hoodie-plugin-react-native-server"]
}
```to the project's `package.json`. After that, you should be good to go!