From b0b3da4f9d79fcc3c790d4981d3299f7a1f35e34 Mon Sep 17 00:00:00 2001 From: Ryan Ashcraft Date: Thu, 13 Apr 2017 09:02:42 -0700 Subject: [PATCH] Add details about how body is used for GET requests --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 12e167e9..ff7c13d4 100644 --- a/README.md +++ b/README.md @@ -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. | @@ -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. |