()
| 169 | |
| 170 | // Checks if the response headers include a JSON mime-type. |
| 171 | private boolean hasJsonHeader() { |
| 172 | String contentType = getRequest().getConnection().getHeaderField(Constants.CONTENT_TYPE); |
| 173 | String[] expectedContentTypes = new String[] { |
| 174 | "application/json", "application/vnd.amadeus+json" |
| 175 | }; |
| 176 | return Arrays.asList(expectedContentTypes).contains(contentType); |
| 177 | } |
| 178 | |
| 179 | // Checks if the response has a body |
| 180 | private boolean hasBody() { |