{"action":"created","issue":{"url":"https://api.github.com/repos/aacerox/node-rest-client/issues/53","labels_url":"https://api.github.com/repos/aacerox/node-rest-client/issues/53/labels{/name}","comments_url":"https://api.github.com/repos/aacerox/node-rest-client/issues/53/comments","events_url":"https://api.github.com/repos/aacerox/node-rest-client/issues/53/events","html_url":"https://github.com/aacerox/node-rest-client/issues/53","id":46855221,"number":53,"title":"Accessing data details in data js object","user":{"login":"quiquee","id":1269364,"avatar_url":"https://avatars.githubusercontent.com/u/1269364?v=3","gravatar_id":"","url":"https://api.github.com/users/quiquee","html_url":"https://github.com/quiquee","followers_url":"https://api.github.com/users/quiquee/followers","following_url":"https://api.github.com/users/quiquee/following{/other_user}","gists_url":"https://api.github.com/users/quiquee/gists{/gist_id}","starred_url":"https://api.github.com/users/quiquee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quiquee/subscriptions","organizations_url":"https://api.github.com/users/quiquee/orgs","repos_url":"https://api.github.com/users/quiquee/repos","events_url":"https://api.github.com/users/quiquee/events{/privacy}","received_events_url":"https://api.github.com/users/quiquee/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2014-10-26T21:22:25Z","updated_at":"2015-11-08T16:34:33Z","closed_at":"2014-11-05T15:18:12Z","body":"Hello,\r\n\r\nI am trying to show some log message when a post successfully completes and I am using the data \r\nobject passed to the POST callback. If I log the whole of data, then it shows ok, if I log only the data.name property , then it shows undefined. I include the code below.\r\n\r\nIf this the expected behaviour?\r\n\r\nvar Client = require('node-rest-client').Client;\r\nvar client = new Client();\r\nvar args = {\r\n\t\t\tdata: { name:  \"Jose\",\r\n\t\t\t\t\tfname: \"Perez\",\r\n\t\t\t\t\temail: \"Jose.Perez@mail.com\" , },\r\n  \t\t\theaders:{\"Content-Type\": \"application/json\"} \r\n\t\t};\r\n\t\t//console.log(i, rows[i].name);\r\n\r\nclient.post(\"http://localhost:3000/player\", args, function(data,response) {\r\n      \t\t\r\n\t// This shows undefined ????\r\n\tconsole.log(data.name);\r\n\r\n    // This shows OK\r\n    // {\"id\":10,\"name\":\"Jose\",....}\r\n    console.log(data);\r\n    \r\n});"},"comment":{"url":"https://api.github.com/repos/aacerox/node-rest-client/issues/comments/154839753","html_url":"https://github.com/aacerox/node-rest-client/issues/53#issuecomment-154839753","issue_url":"https://api.github.com/repos/aacerox/node-rest-client/issues/53","id":154839753,"user":{"login":"martinib77","id":5649614,"avatar_url":"https://avatars.githubusercontent.com/u/5649614?v=3","gravatar_id":"","url":"https://api.github.com/users/martinib77","html_url":"https://github.com/martinib77","followers_url":"https://api.github.com/users/martinib77/followers","following_url":"https://api.github.com/users/martinib77/following{/other_user}","gists_url":"https://api.github.com/users/martinib77/gists{/gist_id}","starred_url":"https://api.github.com/users/martinib77/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martinib77/subscriptions","organizations_url":"https://api.github.com/users/martinib77/orgs","repos_url":"https://api.github.com/users/martinib77/repos","events_url":"https://api.github.com/users/martinib77/events{/privacy}","received_events_url":"https://api.github.com/users/martinib77/received_events","type":"User","site_admin":false},"created_at":"2015-11-08T16:34:33Z","updated_at":"2015-11-08T16:34:33Z","body":"I'm using node-rest-client@1.5.1 (iis express server) and had the same problem\r\nTried changing the mimetypes options but was ignored.\r\nOnly solution was to edit node-rest-client.js and add the space value to the jsonctype."}}