This repository has been archived by the owner on Dec 15, 2020. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Copy body data for PATCH when sending request.
Summary: ## Motivation Solves the issue outlined in #218 When `PATCH`ing, the body of the request is not sent. ## Test Plan Inside of a `componentDidMount` or some event handler in your react-vr codebase, add the following code: ```js const payload = { data: { id: 'de0db600-9a0a-416d-b42b-a19d31aad039', attributes: { field_rotation: '-96', field_rotation_x: '10', }, }, }; fetch(`http://httpbin.org/patch`, { method: 'patch', body: JSON.stringify(payload), headers: { "Content-Type": "application/vnd.api+json" } }) .then(res => res.json()) .then(console.log) ``` In the console, you should see <img width="961" alt="react-vr-body-pr-success" src="https://cloud.githubusercontent.com/assets/1127238/26806183/6c97446c-4a04-11e7-9cdb-cba70b0b8def.png"> Thank you for all of your hard work on this project. ❤️ 😄 Closes #219 Reviewed By: amberroy Differential Revision: D5190034 Pulled By: amberroy fbshipit-source-id: 2200ede
- Loading branch information