Skip to content

Commit

Permalink
Issue #127: Adding support for JSON content types that start with 'js…
Browse files Browse the repository at this point in the history
…on+'
  • Loading branch information
mmattozzi committed Apr 25, 2017
1 parent 89aa837 commit 5aa7cfa
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion core/ContentTypes.m
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ - (BOOL) isXml:(NSString *)contentType {

- (BOOL) isJson:(NSString *)contentType {
return [jsonContentTypes containsObject:contentType] ||
([contentType hasPrefix:@"application"] && [contentType hasSuffix:@"+json"]);}
([contentType hasPrefix:@"application"] && [contentType hasSuffix:@"+json"]) ||
([contentType containsString:@"/json+"]);
}

- (BOOL) isMsgPack:(NSString *)contentType {
return [msgPackContentTypes containsObject:contentType];
Expand Down

0 comments on commit 5aa7cfa

Please sign in to comment.