[ 
https://issues.jenkins-ci.org/browse/JENKINS-13546?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=162369#comment-162369
 ] 

dogfood commented on JENKINS-13546:
-----------------------------------

Integrated in !http://ci.jenkins-ci.org/images/16x16/blue.png! 
[jenkins_ui-changes_branch 
#26|http://ci.jenkins-ci.org/job/jenkins_ui-changes_branch/26/]
     [FIXED JENKINS-13546]: return a JSON string when client request it through 
content-type header (Revision 1409fdff1955581b91904d73781054a63f1d6f85)

     Result = SUCCESS
Kohsuke Kawaguchi : 
[1409fdff1955581b91904d73781054a63f1d6f85|https://github.com/jenkinsci/jenkins/commit/1409fdff1955581b91904d73781054a63f1d6f85]
Files : 
* core/src/main/java/hudson/model/ParametersDefinitionProperty.java
* changelog.html

                
> buildWithParameters: return a JSON string when client request it through 
> content-type header
> --------------------------------------------------------------------------------------------
>
>                 Key: JENKINS-13546
>                 URL: https://issues.jenkins-ci.org/browse/JENKINS-13546
>             Project: Jenkins
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: current
>         Environment: Jenkins 1.460 on Debian Squeeze
>            Reporter: Reynald Borer
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to