Skip to content

Commit

Permalink
docs: pointing to solution for FIXME
Browse files Browse the repository at this point in the history
discussed in pull request #159
  • Loading branch information
analog-nico committed Oct 18, 2016
1 parent a804c7f commit 1389cf7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,7 @@ var $ = require('cheerio'); // Basically jQuery for node.js

function autoParse(body, response, resolveWithFullResponse) {
// FIXME: The content type string could contain additional values like the charset.
// Consider using the `content-type` library for a robust comparison.
if (response.headers['content-type'] === 'application/json') {
return JSON.parse(body);
} else if (response.headers['content-type'] === 'text/html') {
Expand Down

0 comments on commit 1389cf7

Please sign in to comment.