I am modifying an existing Web App Builder template and in order to complete the functionality of a widget I need it to make a connection to a backend service. When I pull up the service url, a form comes up that needs to be filled. I have the information for the form stored in a JSON. I want to pass that to the backend but I am getting errors on how to make the POST request.
Here is what I've tried inside of a function:
url: "url to the backend service",
I have also tried to add the "dojo/request" and "dojo/json" dependencies but those give me errors and won't even let the widget start.
Have anyone else encountered this? Or is there another way to POST request and get a response from a backend service different from what I've coded up?