Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix body parsing for x-www-form-urlencoded and empty
Form data posted with application/x-www-form-urlencoded was ignored. This has been addressed and tested, and the body is now populated. The default handler now shows the content type received so that users can understand what they are sending in via curl or other mechanisms. When no content-type was given, the template did not attempt to do any form of parsing. This has been updated, so set a plain text body type when the sender doesn't provide one. Tested with node and express.js with various content-types. A tech-debt item is that the body parser is now considered deprecated, and a new parser needs to be moved to. Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
- Loading branch information
Showing
2 changed files
with
32 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters