We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
More for completeness, but ran into a case when updating the API for a legacy app. Can put a PR together if needed.
Edit:
module.exports = () => ({ before: (handler, next) => { if (handler.event.pathParameters) { for (let key in handler.event.pathParameters) { try { handler.event.pathParameters[key] = decodeURIComponent( handler.event.pathParameters[key] ) } catch (e) { console.error(e) } } } next() } })
The text was updated successfully, but these errors were encountered:
Sounds good!
one small detail to be aware though is that decodeURIComponent can throw. So we should handle that:
decodeURIComponent
try { var a = decodeURIComponent('%E0%A4%A'); } catch(e) { console.error(e); } // URIError: malformed URI sequence
Source
Sorry, something went wrong.
No branches or pull requests
More for completeness, but ran into a case when updating the API for a legacy app. Can put a PR together if needed.
Edit:
The text was updated successfully, but these errors were encountered: