From 83751fb69062f353d852dfd41c19498f3f7ee053 Mon Sep 17 00:00:00 2001 From: Ben McCann <322311+benmccann@users.noreply.github.com> Date: Fri, 13 Aug 2021 10:10:59 -0700 Subject: [PATCH] update readme --- readme.md | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/readme.md b/readme.md index 62f2380..b93cf10 100644 --- a/readme.md +++ b/readme.md @@ -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