Skip to content

Commit 0af1708

Browse files
authored
Apply suggestions from code review
1 parent c490412 commit 0af1708

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

src/main/java/com/microsoft/graph/core/Constants.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,6 @@ private Constants() {
1717
* The content type for JSON responses
1818
*/
1919
public static final String JSON_CONTENT_TYPE = "application/json";
20-
/**
21-
* The content type for text responses
22-
*/
23-
public static final String TEXT_CONTENT_TYPE = "text/plain";
2420
/**
2521
* The binary content type header's value
2622
*/

src/main/java/com/microsoft/graph/http/CoreHttpProvider.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ public Request authenticateRequest(Request request) {
422422

423423
final String contentType = headers.get(Constants.CONTENT_TYPE_HEADER_NAME);
424424
if (contentType != null && resultClass != InputStream.class &&
425-
(contentType.contains(Constants.JSON_CONTENT_TYPE) || contentType.contains(Constants.TEXT_CONTENT_TYPE))) { // some services reply in text/plain with a JSON representation...
425+
contentType.contains(Constants.JSON_CONTENT_TYPE)) {
426426
logger.logDebug("Response json");
427427
return handleJsonResponse(in, CoreHttpProvider.getResponseHeadersAsMapOfStringList(response), resultClass);
428428
} else if (resultClass == InputStream.class) {

0 commit comments

Comments
 (0)