Skip to content

Commit

Permalink
content type may contain other than the mimetype
Browse files Browse the repository at this point in the history
  • Loading branch information
moch-elearning committed Nov 14, 2019
1 parent 95b1fd5 commit 161b884
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/restful.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,8 @@ export class RestIter<Data> implements Iter<Data> {
}
}
}

if( response.headers.get( "Content-Type" ) == 'application/json' ) {
if( response.headers.get( "Content-Type" ).match( 'application/json' ) ) {
response.json().then( jdata => {
resolve(jdata)
}).catch( err => reject( err ))
Expand Down

0 comments on commit 161b884

Please sign in to comment.