@middy/http-urlencode-path-parser 4.0.0 → 4.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +0 -53
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -36,59 +36,6 @@
36
36
  <p>You can read the documentation at: <a href="https://middy.js.org/docs/middlewares/http-urlencode-path-parser">https://middy.js.org/docs/middlewares/http-urlencode-path-parser</a></p>
37
37
  </div>
38
38
 
39
- This middleware automatically parses HTTP requests with URL-encoded paths. This can happen when using path variables (ie `/{name}/`) for an endpoint and the UI `encodeURIComponent` the values before making the request.
40
-
41
-
42
- ## Install
43
-
44
- To install this middleware you can use NPM:
45
-
46
- ```bash
47
- npm install --save @middy/http-urlencode-path-parser
48
- ```
49
-
50
-
51
- ## Options
52
- None
53
-
54
- ## Sample usage
55
-
56
- ```javascript
57
- import middy from '@middy/core'
58
- import httpUrlEncodePathParser from '@middy/http-urlencode-path-parser'
59
-
60
- const handler = middy((event, context) => {
61
- return event.body // propagates the body as response
62
- })
63
-
64
- handler.use(httpUrlEncodePathParser())
65
-
66
- // When Lambda runs the handler with a sample event...
67
- const event = {
68
-
69
- pathParameters: {
70
- name: encodeURIComponent('Mîddy')
71
- }
72
- }
73
-
74
- handler(event, {}, (_, body) => {
75
- t.deepEqual(body, {
76
- name: 'Mîddy'
77
- })
78
- })
79
- ```
80
-
81
-
82
- ## Middy documentation and examples
83
-
84
- For more documentation and examples, refers to the main [Middy monorepo on GitHub](https://github.com/middyjs/middy) or [Middy official website](https://middy.js.org).
85
-
86
-
87
- ## Contributing
88
-
89
- Everyone is very welcome to contribute to this repository. Feel free to [raise issues](https://github.com/middyjs/middy/issues) or to [submit Pull Requests](https://github.com/middyjs/middy/pulls).
90
-
91
-
92
39
  ## License
93
40
 
94
41
  Licensed under [MIT License](LICENSE). Copyright (c) 2017-2022 [Luciano Mammino](https://github.com/lmammino), [will Farrell](https://github.com/willfarrell), and the [Middy team](https://github.com/middyjs/middy/graphs/contributors).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@middy/http-urlencode-path-parser",
3
- "version": "4.0.0",
3
+ "version": "4.0.2",
4
4
  "description": "Urlencode path parser middleware for the middy framework",
5
5
  "type": "module",
6
6
  "engines": {
@@ -63,9 +63,9 @@
63
63
  },
64
64
  "homepage": "https://middy.js.org",
65
65
  "devDependencies": {
66
- "@middy/core": "4.0.0",
66
+ "@middy/core": "4.0.2",
67
67
  "@types/aws-lambda": "^8.10.101",
68
68
  "type-fest": "^3.0.0"
69
69
  },
70
- "gitHead": "582286144bcd79968a8c7c2f8867a23c80079a47"
70
+ "gitHead": "c77c9413ecb80999a71b67ff97edac1fed2ca754"
71
71
  }