★ wanayoo — archive 1999 https://github.com/feathersjs/feathers/pull/27Nouvelle recherche | Portail wanayoo
Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Remove middleware: connect.bodyParser() #27

Merged
merged 1 commit into from

3 participants

Steffen Bruchmann David Luecke Eric Kryski
Steffen Bruchmann

Because connect.bodyParser() is deprecated
and will be removed in Connect 3, this
commit removes it from the stack and
uses express.urlencoded() and
express.json() instead.

Visit the Connect Wiki for more information.

Steffen Bruchmann Remove middleware: connect.bodyParser() …
Because `connect.bodyParser()` is deprecated
and will be removed in Connect 3, this
commit removes it from the stack and
uses `express.urlencoded()` and
`express.json()` instead.

Visit the [Connect Wiki][wiki] for more information.

[wiki]: https://github.com/senchalabs/connect/wiki/Connect-3.0
83ba2d5
David Luecke
Owner

Ah that's where that warning came from. Thanks!

David Luecke daffl merged commit 216954c into from
Steffen Bruchmann sbruchmann deleted the branch
Eric Kryski
Owner

:boom: nice! Thanks for that @sbruchmann. That has been bugging me for a while.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 12, 2013
  1. Remove middleware: connect.bodyParser() …

    Steffen Bruchmann authored
    Because `connect.bodyParser()` is deprecated
    and will be removed in Connect 3, this
    commit removes it from the stack and
    uses `express.urlencoded()` and
    `express.json()` instead.
    
    Visit the [Connect Wiki][wiki] for more information.
    
    [wiki]: https://github.com/senchalabs/connect/wiki/Connect-3.0
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 1 deletion.
  1. +2 −1  lib/feathers.js
3  lib/feathers.js
View
@@ -18,7 +18,8 @@ function createApplication() {
Proto.mixin(Application, app);
app.init();
// Add REST provider by default, can always be disabled using app.disable('feathers rest')
- app.use(express.bodyParser()).configure(providers.rest());
+ app.use(express.urlencoded());
+ app.use(express.json()).configure(providers.rest());
return app;
}
Something went wrong with that request. Please try again.