{"action":"created","issue":{"url":"https://api.github.com/repos/elastic/elasticsearch-js/issues/98","labels_url":"https://api.github.com/repos/elastic/elasticsearch-js/issues/98/labels{/name}","comments_url":"https://api.github.com/repos/elastic/elasticsearch-js/issues/98/comments","events_url":"https://api.github.com/repos/elastic/elasticsearch-js/issues/98/events","html_url":"https://github.com/elastic/elasticsearch-js/issues/98","id":32884543,"number":98,"title":"Client should send appropriate content headers","user":{"login":"bsander","id":517850,"avatar_url":"https://avatars.githubusercontent.com/u/517850?v=3","gravatar_id":"","url":"https://api.github.com/users/bsander","html_url":"https://github.com/bsander","followers_url":"https://api.github.com/users/bsander/followers","following_url":"https://api.github.com/users/bsander/following{/other_user}","gists_url":"https://api.github.com/users/bsander/gists{/gist_id}","starred_url":"https://api.github.com/users/bsander/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bsander/subscriptions","organizations_url":"https://api.github.com/users/bsander/orgs","repos_url":"https://api.github.com/users/bsander/repos","events_url":"https://api.github.com/users/bsander/events{/privacy}","received_events_url":"https://api.github.com/users/bsander/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/elastic/elasticsearch-js/labels/considering","name":"considering","color":"c7def8"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2014-05-06T11:34:50Z","updated_at":"2016-01-17T08:47:09Z","closed_at":null,"body":"We use the elasticsearch client in an environment where elasticsearch is proxied by a node.js restify app that performs some content modification. By default, this proxy interprets all requests performed by elasticsearch-js as plain text, because no `Content-Type: application/json` header is set. Adding this header (and for completeness, also `Accept: application/json`) would really help here."},"comment":{"url":"https://api.github.com/repos/elastic/elasticsearch-js/issues/comments/172301382","html_url":"https://github.com/elastic/elasticsearch-js/issues/98#issuecomment-172301382","issue_url":"https://api.github.com/repos/elastic/elasticsearch-js/issues/98","id":172301382,"user":{"login":"sliontc","id":6959147,"avatar_url":"https://avatars.githubusercontent.com/u/6959147?v=3","gravatar_id":"","url":"https://api.github.com/users/sliontc","html_url":"https://github.com/sliontc","followers_url":"https://api.github.com/users/sliontc/followers","following_url":"https://api.github.com/users/sliontc/following{/other_user}","gists_url":"https://api.github.com/users/sliontc/gists{/gist_id}","starred_url":"https://api.github.com/users/sliontc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sliontc/subscriptions","organizations_url":"https://api.github.com/users/sliontc/orgs","repos_url":"https://api.github.com/users/sliontc/repos","events_url":"https://api.github.com/users/sliontc/events{/privacy}","received_events_url":"https://api.github.com/users/sliontc/received_events","type":"User","site_admin":false},"created_at":"2016-01-17T08:47:09Z","updated_at":"2016-01-17T08:47:09Z","body":"how to set the header config dynamically?"}}