When calling a specific task in our Universal web GUI, a dialogue appears containing a form, in which I can change and enter the form values required to execute said task.
This specific task contains a dropdown select-element, as well as some regular text fields and a few check boxes. Below is one such dialogue:
When I change a value, like (un-)checking one of the checkboxes, I can see in the network inspector of my browser a PATCH request is made on the staged resource.
The request body contains only the changed value, and the response returns two booleans indicating whether the layout and/or resource have changed, respectively.
When I select an item in the dropdown however, I can see in the inspector a POST request is made to a “choose” endpoint, also on the staged resource. The response of this request is similar to the PATCH request.
The request does not contain a body, but the URL looks like below;
staged_task(guid_of_resource)/list_reason_id(status=123,reason_id=456)/choose
The value selected in the dropdown is also a parameter to the staged task, and selecting a value seems to trigger the same follow-up requests.
This has left me wondering what the difference is between the two, and if it is required dropdown values are supplied like this to ensure proper functionality of the dialogue. Would it not be possible, or would it break the form, if I supply the selected value from the dropdown through a PATCH request, similar to how the checkbox values are supplied.
Should there be any questions, do please ask them in a comment!
Thanks in advance!