MCPcopy Create free account
hub / github.com/amadeus4dev/amadeus-java / hasJsonHeader

Method hasJsonHeader

src/main/java/com/amadeus/Response.java:171–177  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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() {

Callers 1

isJsonMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected