Skip to content

Commit 3b4fc20

Browse files
committed
Minor refactoring
1 parent 11fcd8c commit 3b4fc20

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

dddsample/external/reporting/src/test/java/com/reporting/ReportServiceTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,18 +173,18 @@ public void reportHandling() throws Exception {
173173
}
174174

175175
private HttpURLConnection openXMLPostConnection(String path) throws IOException {
176-
return openWithMethod(path, "POST");
176+
return openWithMethod(path, "POST", "application/xml");
177177
}
178178

179179
private HttpURLConnection openXMLPutConnection(String path) throws IOException {
180-
return openWithMethod(path, "PUT");
180+
return openWithMethod(path, "PUT", "application/xml");
181181
}
182182

183-
private HttpURLConnection openWithMethod(String path, String method) throws IOException {
183+
private HttpURLConnection openWithMethod(String path, String method, String contentType) throws IOException {
184184
HttpURLConnection con = open(path);
185185
con.setDoOutput(true);
186186
con.setRequestMethod(method);
187-
con.setRequestProperty("Content-type", "application/xml");
187+
con.setRequestProperty("Content-type", contentType);
188188
return con;
189189
}
190190

0 commit comments

Comments
 (0)