'Get All Input' function causes 'Unable to decode input error'

Options

Hi all,

I'm having trouble getting the “Get All Input” function to work properly. My setup is as follows:

  1. I have a submission form on a Webflow page with POST action set to endpoint in Xano.
  2. The first function in this endoint's funtion Stack is “Get All Input” with json encoding.
  3. 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

  • Michael Udinski
    Michael Udinski Administrator

    ADMIN

    Options

    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

  • Tom Wolf
    Tom Wolf Member
    Options

    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 :)

  • Michael Udinski
    Michael Udinski Administrator

    ADMIN

    Options

    Great! Thanks for sharing the solution @Tom Wolf :)