'Get All Input' function causes 'Unable to decode input error'
![Tom Wolf](https://us.v-cdn.net/6037124/uploads/userpics/1IRV8SVYSO83/nN4I59IDV3XVE.jpg)
Hi all,
I'm having trouble getting the “Get All Input” function to work properly. My setup is as follows:
- I have a submission form on a Webflow page with POST action set to endpoint in Xano.
- The first function in this endoint's funtion Stack is “Get All Input” with json encoding.
- When I send some test data from the form in Webflow, I get the “Unable to decode input error” in Xano.
What's interesting, when I Run & Debug and paste the exact same json value as being sent from Webflow, it all works well.
I have tried chagning the encoding to “text”, but then I have a idfferent type of error:
“Unable to locate var: payload.email”
I have also tried adding “json_encode” filter but it didn't work.
What I am doing wrong?
Comments
-
Hey @Tom Wolf - can you expand that input section and send a screenshot? This will help give us clues to the format that Webflow is sending the payload… I suspect it is in text format since the text encoding worked for you (it's likely the Xano debugger is beautifying the text to JSON for you when you paste it in the debugger)… but let's first start with looking at what's sent in the input
-
Hi Michael,
thank you for quick response.
When you wrote that I went to see the input details and then noticed in the Request Headers the Content-Type is neither json nor text but application/x-www-form-urlencoded. I changed that accordingly in the Get All Input, than added a json_encode filter and it now all works :)
-
Great! Thanks for sharing the solution @Tom Wolf :)
Categories
- All Categories
- 53 ? Announcements
- 47 ? Releases
- 37 ? Welcome
- 983 ? Help! I'm a Noob
- 125 ? No-Code Front-Ends
- 633 ? Working with APIs
- 439 ? Transforming data
- 126 ? Connect Xano to ...
- 50 ?? Find an Expert
- 348 ❓Other questions
- 35 ? Security
- 22 ✂️ Snippets
- 19 ? Showcase
- 7 ?️ Xano Chatter
- 62 ? Video Tutorials
- 171 ? Request a feature
- 229 ? Report a Bug
- 19 ? Templates & Extensions
- 7 ? Feedback