From f89bf96a76fe65fd0d3f9a4e14054e957b4b1e93 Mon Sep 17 00:00:00 2001
From: Christian Pfaller <pfaller@cqse.eu>
Date: Tue, 5 May 2020 12:30:20 +0200
Subject: [PATCH 1/2] enforce JSON response from Jira

---
 .../main/java/eu/cqse/qcs/jiratasks/jiraclient/IJiraAPI.java    | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/eu.cqse.qcs.jiratasks/src/main/java/eu/cqse/qcs/jiratasks/jiraclient/IJiraAPI.java b/eu.cqse.qcs.jiratasks/src/main/java/eu/cqse/qcs/jiratasks/jiraclient/IJiraAPI.java
index e742f17..319814e 100644
--- a/eu.cqse.qcs.jiratasks/src/main/java/eu/cqse/qcs/jiratasks/jiraclient/IJiraAPI.java
+++ b/eu.cqse.qcs.jiratasks/src/main/java/eu/cqse/qcs/jiratasks/jiraclient/IJiraAPI.java
@@ -2,6 +2,7 @@
 
 import retrofit2.Call;
 import retrofit2.http.Body;
+import retrofit2.http.Headers;
 import retrofit2.http.POST;
 import retrofit2.http.Path;
 
@@ -14,6 +15,7 @@ public interface IJiraAPI {
 	 * Creates a new {@link Issue}, the issue key and id is contained in the
 	 * returned response.
 	 */
+	@Headers({"Accept: application/json"})
 	@POST("/rest/api/2/issue/")
 	Call<IssueResponse> createIssue(@Body Issue issue);
 

From 05fd21487bd2813d2b34cc31c05f7e17fa4f0ab3 Mon Sep 17 00:00:00 2001
From: Christian Pfaller <pfaller@cqse.eu>
Date: Tue, 5 May 2020 12:50:22 +0200
Subject: [PATCH 2/2] enforce JSON response from Jira

---
 .../eu/cqse/qcs/jiratasks/teamscaleclient/ITeamscaleAPI.java   | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/eu.cqse.qcs.jiratasks/src/main/java/eu/cqse/qcs/jiratasks/teamscaleclient/ITeamscaleAPI.java b/eu.cqse.qcs.jiratasks/src/main/java/eu/cqse/qcs/jiratasks/teamscaleclient/ITeamscaleAPI.java
index f5afc80..baf92e1 100644
--- a/eu.cqse.qcs.jiratasks/src/main/java/eu/cqse/qcs/jiratasks/teamscaleclient/ITeamscaleAPI.java
+++ b/eu.cqse.qcs.jiratasks/src/main/java/eu/cqse/qcs/jiratasks/teamscaleclient/ITeamscaleAPI.java
@@ -5,6 +5,7 @@
 import retrofit2.Call;
 import retrofit2.http.Body;
 import retrofit2.http.GET;
+import retrofit2.http.Headers;
 import retrofit2.http.PUT;
 import retrofit2.http.Path;
 
@@ -15,12 +16,14 @@ public interface ITeamscaleAPI {
 	/**
 	 * Gets all tasks for a project
 	 */
+	@Headers({"Accept: application/json"})
 	@GET("/api/projects/{project}/tasks")
 	Call<List<Task>> getTasks(@Path("project") String project);
 
 	/**
 	 * Updates a task, e.g. to add Link to Jira
 	 */
+	@Headers({"Accept: application/json"})
 	@PUT("/api/projects/{project}/tasks/{id}?keep-findings=true")
 	Call<Task> updateTask(@Path("project") String project, @Path("id") int taskId, @Body Task task);
 }