@feizheng/next-parse-request-args

1.0.11 • Public • Published

next-parse-request-args

Request arguments parser.

version license size download

installation

npm install -S @feizheng/next-parse-request-args

usage

import '@feizheng/next-parse-request-args';

// input:
// 1. (config)
// 2. (url)
// 3. (url, config)
// 4. (method, config)
// 5. (method, url, config)
// 6. (method, url, data, config)

// output:
{
  url: '/api/v1',
  method:'get',
  data: { query:1, zx:1 },
  headers: { 
    'Authorization': 'eyJhbGciOiJIUzUxMiJ9',
    'Content-Type': 'application/json' 
  }
}

license

Code released under the MIT license.

Package Sidebar

Install

npm i @feizheng/next-parse-request-args

Weekly Downloads

1

Version

1.0.11

License

MIT

Unpacked Size

9.13 kB

Total Files

6

Last publish

Collaborators

  • afeiship