{"action":"opened","issue":{"url":"https://api.github.com/repos/jkbrzt/httpie/issues/509","repository_url":"https://api.github.com/repos/jkbrzt/httpie","labels_url":"https://api.github.com/repos/jkbrzt/httpie/issues/509/labels{/name}","comments_url":"https://api.github.com/repos/jkbrzt/httpie/issues/509/comments","events_url":"https://api.github.com/repos/jkbrzt/httpie/issues/509/events","html_url":"https://github.com/jkbrzt/httpie/issues/509","id":172056580,"number":509,"title":"Allow user override response header to parse response body?","user":{"login":"acrazing","id":10029810,"avatar_url":"https://avatars.githubusercontent.com/u/10029810?v=3","gravatar_id":"","url":"https://api.github.com/users/acrazing","html_url":"https://github.com/acrazing","followers_url":"https://api.github.com/users/acrazing/followers","following_url":"https://api.github.com/users/acrazing/following{/other_user}","gists_url":"https://api.github.com/users/acrazing/gists{/gist_id}","starred_url":"https://api.github.com/users/acrazing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acrazing/subscriptions","organizations_url":"https://api.github.com/users/acrazing/orgs","repos_url":"https://api.github.com/users/acrazing/repos","events_url":"https://api.github.com/users/acrazing/events{/privacy}","received_events_url":"https://api.github.com/users/acrazing/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-08-19T05:21:21Z","updated_at":"2016-08-19T05:21:21Z","closed_at":null,"body":"For example, if server response with header `Content-Type: text/html`, but the response body's format is json, I need to parse it to print pretty.\r\n\r\nAdd a config option to do it?\r\n\r\nexample:\r\n\r\n```js\r\n// server code\r\nvar http = require('http');\r\nhttp.createServer(function(req, res) {\r\n    res.setHeader('Content-Type', 'text/html');\r\n    res.end(JSON.stringify({code: 0, data: 'hello world'}));\r\n}).listen(3000);\r\n```\r\n\r\n```bash\r\n# http client\r\nMacBook-Pro-4:~ acrazing$ http localhost:3000\r\nHTTP/1.1 200 OK\r\nConnection: keep-alive\r\nContent-Length: 31\r\nContent-Type: text/html\r\nDate: Fri, 19 Aug 2016 05:18:43 GMT\r\n\r\n{\"code\":0,\"data\":\"hello world\"}\r\n```\r\n\r\nI hope add a param to parse response as json!"}}
{"actor":{"display_login":"acrazing"}}