API post Body

Options
Hello all, 

I am new here and I am trying to send a post request to my API with a Body that is a json. 
my only issue is I do not know how to get the body in my API. 

Thanks for your help
Alex

Comments

  • Ray Deck
    Ray Deck Trusted Xano Expert ✭✭✭
    Options
    Two approaches. You can define fields you expect to receive in your body - e.g. part of the JSON - in the input variables. That way if your json is {"hello":"there"} and you have an input called hello, the value is "there."

    There is also a "Utility Function" you can use to get the request body specifically called "Get All Input (Webhook)" so as to read the whole JSON (or whatever other body text) however it came across. 
  • Alexandre HUSSET
    Options
     Thanks a lot, I posted a first message because I had an issue but I solved it 

    many thanks you saved my night ;)