Pass app state variables into API call body

Actions & Logic

I've got a button that validates a form and then makes an API call to a /create_request endpoint running on my local server. The JSON body of the API call needs to contain values from the form. I thought of achieving this by creating app state variables, and then writing the form data to these variables before referencing the variables in the JSON body. Is that the right approach to this?

What have you tried so far?
{ 
  "location": "$location",
  "pickup_method": "$pickupMethod"
}

When the server receives the API request, these values are left as $location and $pickupMethod...not the actual values.

Did you check FlutterFlow's Documentation for this topic?
Yes
2 replies