Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Append header to force server to return error in json message formag

  • Loading branch information...
commit 0fa3a81c6a330407f4b0131c83a7bcb574f5b502 1 parent c51ddd3
Nelson Wang authored
Showing with 2 additions and 0 deletions.
  1. +2 −0  src/java/SoaWebApiClient/src/SoaWebApiClient.java
View
2  src/java/SoaWebApiClient/src/SoaWebApiClient.java
@@ -165,6 +165,7 @@ public void closeSession() throws Throwable {
closeSession.setRequestMethod("POST");
closeSession.setRequestProperty("Authorization", "Basic "
+ this.basicauthinfo);
+ closeSession.setRequestProperty("Accept", "application/json");
closeSession.setRequestProperty(ApiVersionName, ApiVersionValue);
closeSession.setDoOutput(true);
@@ -202,6 +203,7 @@ public void attachSession(int attachSessionId) throws Throwable {
attachSession.setRequestProperty("Accept", "application/json");
attachSession.setRequestProperty("CONTENT-TYPE",
"application/json; charset=utf-8");
+ attachSession.setRequestProperty("Accept", "application/json");
attachSession.setRequestProperty(ApiVersionName, ApiVersionValue);
attachSession.setDoInput(true);
attachSession.setReadTimeout(120000);
Please sign in to comment.
Something went wrong with that request. Please try again.