buildWithParameters: return a JSON string when client request it through content-type header

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Major
    • Component/s: core
    • Environment:
      Jenkins 1.460 on Debian Squeeze

      Right now, every call on the buildWithParameters URL will always redirect to the job page on success. If this API is queried through an Ajax call, it should return a JSON output of the current job instead. This can easily be detected based on the Content-Type http header sent by the client.

      This is useful for example if one wants to trigger a parametrized build from jQuery, and parse the result. Right now, jQuery will always get back the HTML page of the job, which makes it hard to do any error handling.

            Assignee:
            Bertrand Roussel
            Reporter:
            Reynald Borer
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: