Skip to content

Commit

Permalink
📝 Fix readme typo
Browse files Browse the repository at this point in the history
  • Loading branch information
elbywan committed Aug 30, 2018
1 parent 03c5cbe commit 78b7a2b
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ w = w.query({ reset: true }, true)
// url is now http://example.com?reset=true
```

**Note that .query is not meant to handle complex cases with nested objects.**
##### **Note that .query is not meant to handle complex cases with nested objects.**

For this kind of usage, you can use `wretch` in conjunction with other libraries (like [`qs`](https://github.com/ljharb/qs)).

Expand All @@ -331,10 +331,8 @@ const queryObject = { some: { nested: 'objects' }}

// Use .defer :

const qsWretch = wretch().defer((w, url, { qs }) => (
qs ?
w.query(qs.stringify(qs.query, qs.options)) :
w
const qsWretch = wretch().defer((w, url, { qsQuery, qsOptions }) => (
qsQuery ? w.query(qs.stringify(qsQuery, qsOptions)) : w
))

qsWretch
Expand Down

0 comments on commit 78b7a2b

Please sign in to comment.