Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
benmccann committed Aug 13, 2021
1 parent cb1465c commit 83751fb
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,22 +126,12 @@ You may also pass a sub-application, which _must_ be accompanied by a `base` pat
Please see [`Middleware`](#middleware) and [Express' middleware examples](http://expressjs.com/en/4x/api.html#middleware-callback-function-examples) for more info.


### parse(req, toDecode=true)
### parse(req, toDecode=false)

Returns: `Object` or `undefined`

As of `v0.5.0`, this is an alias of the [`@polka/url`](/packages/url) module. For nearly all cases, you'll notice no changes.

One important difference is that URL decoding is enabled by default in polka but it is disabled by default in the `@polka/url` module. You can disable the URL decoding if required,

```js
const app = polka();
const { parse } = require('@polka/url');
app.parse = (req, toDecode) => {
return parse(req, false); // or simply, return parse(req);
}
```

But, for whatever reason, you can quickly swap in [`parseurl`](https://github.com/pillarjs/parseurl) again:

```js
Expand Down

0 comments on commit 83751fb

Please sign in to comment.