Skip to content

Commit

Permalink
Add details about how body is used for GET requests
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan Ashcraft committed Apr 13, 2017
1 parent 3961ef4 commit b0b3da4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ Query configs are objects used to describe how redux-query should handle the req
| `url` | string | yes | The URL for the HTTP request. |
| `transform` | function | | Function that transforms the response data to an entities object where keys are entity IDs and values are entity data. Can be used to normalize data. |
| `update` | object | yes | Object where keys are entity IDs and values are update functions. |
| `body` | object | | The request body. |
| `body` | object | | The request body. For GETs, this object is stringified and appended to the URL as query params. |
| `force` | boolean | | Perform the request even if we've already successfully requested it. |
| `queryKey` | string | | The identifier used to identify the query metadata in the `queries` reducer. If unprovided, the `url` and `body` fields are serialized to generate the query key. |
| `meta` | object | | Various metadata for the query. Can be used to update other reducers when queries succeed or fail. |
Expand All @@ -104,7 +104,7 @@ Query configs are objects used to describe how redux-query should handle the req
| `transform` | function | | Function that transforms the response data to an entities object where keys are entity IDs and values are entity data. Can be used to normalize data. |
| `update` | object | yes | Object where keys are entity IDs and values are update functions. |
| `optimisticUpdate` | object | | Object where keys are entity IDs and values are functions that provide the current entity value. The return values are used to update the `entities` store until the mutation finishes. |
| `body` | object | | The HTTP request body. |
| `body` | object | | The HTTP request body. For GETs, this object is stringified and appended to the URL as query params. |
| `queryKey` | string | | The identifier used to identify the query metadata in the `queries` reducer. If unprovided, the `url` and `body` fields are serialized to generate the query key. |
| `meta` | object | | Various metadata for the query. Can be used to update other reducers when queries succeed or fail. |
| `options` | object | | Options for the request. Set `options.method` to change the HTTP method, `options.headers` to set any headers and `options.credentials = 'include'` for CORS. |
Expand Down

0 comments on commit b0b3da4

Please sign in to comment.