This example wasn't working out the box for addresses or names with special characters, all requests were coming back as INVALID unless they had no special characters.
This issue relates to converting to JSON via express body-parser and then trying to convert back to a raw string via querystring.
As you can now access the raw body in GCP Functions (and Firebase) via rawBody (docs), I've swapped out querystring for using rawBody instead.
Tested on my project and now works correctly without INVALID messages.
This example wasn't working out the box for addresses or names with special characters, all requests were coming back as
INVALID
unless they had no special characters.This issue relates to converting to JSON via express
body-parser
and then trying to convert back to a raw string viaquerystring
.As you can now access the raw body in GCP Functions (and Firebase) via
rawBody
(docs), I've swapped outquerystring
for usingrawBody
instead.Tested on my project and now works correctly without
INVALID
messages.