Returns a function that may be used to programmatically submit a form (or some arbitrary data) to the server.