File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
src/main/java/com/amadeus Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ protected void parse(HTTPClient client) {
6464 parseData (client );
6565 }
6666
67- // Detects of any exceptions have occured and throws the appropriate exceptions.
67+ // Detects of any exceptions have occurred and throws the appropriate exceptions.
6868 protected void detectError (HTTPClient client ) throws ResponseException {
6969 ResponseException exception = null ;
7070 if (statusCode >= 500 ) {
@@ -121,6 +121,11 @@ private void parseData(HTTPClient client) {
121121
122122 // Tries to read the body.
123123 private String readBody () {
124+ // Workaround to avoid ParserException when status code is 204
125+ if (statusCode == 204 ) {
126+ body = "{ \" data\" : { } } " ;
127+ return body ;
128+ }
124129 // Get the connection
125130 HttpURLConnection connection = getRequest ().getConnection ();
126131
You can’t perform that action at this time.
0 commit comments