BZ-9072: add utility method to turn an angular form into a form POST
payload