mirror of
https://github.com/Fishwaldo/rundeck-api-java-client.git
synced 2025-07-08 05:58:39 +00:00
Use accept header in in /jobs/export request
This commit is contained in:
parent
af37fd1f56
commit
aba9f8de2b
1 changed files with 7 additions and 5 deletions
|
@ -542,11 +542,13 @@ public class RundeckClient implements Serializable {
|
|||
throws RundeckApiException, RundeckApiLoginException, RundeckApiTokenException, IllegalArgumentException {
|
||||
AssertUtil.notNull(format, "format is mandatory to export jobs !");
|
||||
AssertUtil.notBlank(project, "project is mandatory to export jobs !");
|
||||
return new ApiCall(this).get(new ApiPathBuilder("/jobs/export").param("format", format)
|
||||
.param("project", project)
|
||||
.param("jobFilter", jobFilter)
|
||||
.param("groupPath", groupPath)
|
||||
.param("idlist", StringUtils.join(jobIds, ",")));
|
||||
return new ApiCall(this).get(new ApiPathBuilder("/jobs/export")
|
||||
.accept(format == FileType.XML ? "text/xml" : "text/yaml")
|
||||
.param("format", format)
|
||||
.param("project", project)
|
||||
.param("jobFilter", jobFilter)
|
||||
.param("groupPath", groupPath)
|
||||
.param("idlist", StringUtils.join(jobIds, ",")));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue