request-arguments-parser

0.1.0 • Public • Published

Parses a HTTP request argument, regardless of whether it is a GET, POST form, JSON or route parameter.

Currently only work with express requests.

If an argument key is on passed multiple times (ie: GET /api/?service=) only one is return. The following hierarchy is respected (the first encounter wins)

  1. route ==> /api/:variable
  2. body ==> {"variable": [..]}
  3. get param ==> /api?variable=[..]

You have to prepare the request with the connect.bodyParser, json or/and urlencoding middleware.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.0
    151
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.0
    151

Package Sidebar

Install

npm i request-arguments-parser

Weekly Downloads

10

Version

0.1.0

License

MIT

Last publish

Collaborators

  • nherment
  • rjrodger