On Sun, Aug 3, 2014 at 2:52 PM, Salim Fadhley <[email protected]> wrote: > According to the documentation parameters for builds need to get submitted > as form-fields, simple enough but I also notice that the Build with > Parameters form submits an additional hidden JSON encoded form field. Is > that actually used for anything?
Probably not. In general, any Jenkins form submits *two* copies of every field. One is submitted automatically by the browser, according to the HTML spec; the other is created by JavaScript code in Jenkins to implement https://wiki.jenkins-ci.org/display/JENKINS/Structured+Form+Submission and has the same data but wrapped in JSON and organized according to logical structure of configuration items. Any given submission handler pays attention to one of these and ignores the other. Generally speaking, any /configSubmit or the like which accepts forms created using tags in the /lib/form namespace uses the JSON data, which is parsed via methods defined in Stapler. Some miscellaneous form handlers, such as the one handling parameterized build submissions, will read parameter definitions straight from the HTTPServletRequest in the normal way; these could have been URL-encoded POSTed submissions, or query parameters. -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
