{"action":"created","issue":{"url":"https://api.github.com/repos/vlucas/frisby/issues/286","labels_url":"https://api.github.com/repos/vlucas/frisby/issues/286/labels{/name}","comments_url":"https://api.github.com/repos/vlucas/frisby/issues/286/comments","events_url":"https://api.github.com/repos/vlucas/frisby/issues/286/events","html_url":"https://github.com/vlucas/frisby/issues/286","id":119136944,"number":286,"title":"is frisbyjs capable to handle 201 response?","user":{"login":"ASYB","id":4861777,"avatar_url":"https://avatars.githubusercontent.com/u/4861777?v=3","gravatar_id":"","url":"https://api.github.com/users/ASYB","html_url":"https://github.com/ASYB","followers_url":"https://api.github.com/users/ASYB/followers","following_url":"https://api.github.com/users/ASYB/following{/other_user}","gists_url":"https://api.github.com/users/ASYB/gists{/gist_id}","starred_url":"https://api.github.com/users/ASYB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ASYB/subscriptions","organizations_url":"https://api.github.com/users/ASYB/orgs","repos_url":"https://api.github.com/users/ASYB/repos","events_url":"https://api.github.com/users/ASYB/events{/privacy}","received_events_url":"https://api.github.com/users/ASYB/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-27T06:13:17Z","updated_at":"2015-11-28T00:20:54Z","closed_at":null,"body":"When ever my Api response 201, afterJSON(function(json)) is throwing an error below \r\n\r\n Error: Error parsing JSON string: Unexpected token \r\n\tGiven: ���TJL�*-.�M�+Q�R���������TJI-N.�,(���S�RP\r\nv˧g���%8g$���hE�ª�(1/%$�$1$j�ga�&�MS>�+�) !4O$V���3����4B��KLI)J-.����$�ɩT�_�WZ I�)0�30��p.-*J�K�)\r\n                                                                               ���Bv��JI�99�y��P���[͍-��\r\n                                                                                                       MM����TJ�,��/��<??&\r\n��\"�ӡbi�E�%~����*�H�̆J�$\"đ��T�_\r\n\r\n�����d��K���s\\K�����S)jV$H|SK2`��T*K�)K��b�D�9�(�o�Z�tc@\r\n���\r\n   -$`l`\t\t@P�cqIbI�Q@Q~Yf^r*̟�~�)� '195�%�,gh�od�od��RQjqA~^qjH&D����X�8�,3/�$f�IyP1l�*�Z�\r\n                                                                                                       �YJf������Fz��eZ�����\\���(+@*\t���̃d`����x�bl  (%����t\r\n �$�1C*�^�_Z(�O)M.�I-K�\t(����C������9������TUV��@�������Z������Y��P\\�T*�|��*���+���(d�%甦�*�g���|X������J\r\n�E�:\r\n%�:\r\n�E\r\n��/��KWH�KQ�\r\n            ��\r\n��R�X>\r\n��99\r\nI�\r\n�9��)\r\n�%\r\n������%z\r\n���`���K�\r\n�R�2�K��QK3���\r\n              \tHIfh```jjN��*B*\r\n                               �1IIqF~Q�\r\n                                        j��-0�.��Lx&ǙB�=<�A9�а<�0>='?)1'�(5R����n�4\r\n                                                                                   ȉ�I���\r\nx\"��[Qj�BpIb^\r\n�s�X��SH�Ɂ����YjQqfU*RT���+�&V*����z\r\na�9�) �p�J�J2RL,���J2�KA1.���i�1�?F�-�_O�?--�H�\r\nMMͨ٠HAJ�h�                                      lBZ~�BIFQ~iz���Q���)�؂z=�\r\n         �!(�JJ�3@����,%\r\nK2@�f��[����'�楚��&��ꕀ+���tC�������������}H=�ohbhjhalf_��bkn����ik��ŉ�VB�G������O��)e&���bw/ZK��5��#���19uf����d�eB��ra�܂�=��}�\\���<�]�C|<]�q9,9�$1'?�T�C[\"�Ff��XMjEAjrIj�KjNfYjQ%�f\r\n                                                            OM�%PRAJ&��RAbRX�\\*���$���S�\r\n�W�E���9�jʆ�&�\r\n��� �KR���s��3�Jt,����JRS�A��Q�@|cldb`lajhhWQ�XT�h?��!]��\r\n                                                         r\r\n                                                          �T�AK���9�\r\n`-P`\r\nCa��%�� '�]>\r\n            ��0Գ4�=���y%�z�P�$�'���5pQ$�4 ���h䚠hG�&d�/�-+�0`u!B�|�\r\n��V~IFjQ@F>�͢�adh��`dl�khld\r\n                          1P\tw�\r\n                                  \"_�Y���Dj���o7�K~X�][��µ�(���A�e~N~zfU*�(M̫U��ye�y��yɩ:\r\nI�%\r\n��\r\n�E�\r\n�Z�$�R�4��K��s�KsKR*�K��=P��#�K����?���P��\t���%{y*�v��/�L�����1�� l8��Aܟ����\r\n�\r\nP����nlA�@�ĩ�؂d%X��*�P^D��2����{�4<`�'h\r\n                                       vG�N�`5E��ٮ����$�i3;T&f���j*%�Z�CP\r\n   Stacktrace:\r\n     Error: Error parsing JSON string: Unexpected token \r\n\tGiven: ���TJL�*-.�M�+Q�R���������TJI-N.�,(���S�RP\r\nv˧g���%8g$���hE�ª�(1/%$�$1$j�ga�&�MS>�+�) !4O$V���3����4B��KLI)J-.����$�ɩT�_�WZ I�)0�30��p.-*J�K�)\r\n                                                                               ���Bv��JI�99�y��P���[͍-��\r\n                                                                                                       MM����TJ�,��/��<??&\r\n��\"�ӡbi�E�%~����*�H�̆J�$\"đ��T�_\r\n\r\n�����d��K���s\\K�����S)jV$H|SK2`��T*K�)K��b�D�9�(�o�Z�tc@\r\n���\r\n   -$`l`\t\t@P�cqIbI�Q@Q~Yf^r*̟�~�)� '195�%�,gh�od�od��RQjqA~^qjH&D����X�8�,3/�$f�IyP1l�*�Z�\r\n                                                                                                       �YJf������Fz��eZ�����\\���(+@*\t���̃d`����x�bl  (%����t\r\n �$�1C*�^�_Z(�O)M.�I-K�\t(����C������9������TUV��@�������Z������Y��P\\�T*�|��*���+���(d�%甦�*�g���|X������J\r\n�E�:\r\n%�:\r\n�E\r\n��/��KWH�KQ�\r\n            ��\r\n��R�X>\r\n��99\r\nI�\r\n�9��)\r\n�%\r\n������%z\r\n���`���K�\r\n�R�2�K��QK3���\r\n              \tHIfh```jjN��*B*\r\n                               �1IIqF~Q�\r\n                                        j��-0�.��Lx&ǙB�=<�A9�а<�0>='?)1'�(5R����n�4\r\n                                                                                   ȉ�I���\r\nx\"��[Qj�BpIb^\r\n�s�X��SH�Ɂ����YjQqfU*RT���+�&V*����z\r\na�9�) �p�J�J2RL,���J2�KA1.���i�1�?F�-�_O�?--�H�\r\nMMͨ٠HAJ�h�                                      lBZ~�BIFQ~iz���Q���)�؂z=�\r\n         �!(�JJ�3@����,%\r\nK2@�f��[����'�楚��&��ꕀ+���tC�������������}H=�ohbhjhalf_��bkn����ik��ŉ�VB�G������O��)e&���bw/ZK��5��#���19uf����d�eB��ra�܂�=��}�\\���<�]�C|<]�q9,9�$1'?�T�C[\"�Ff��XMjEAjrIj�KjNfYjQ%�f\r\n                                                            OM�%PRAJ&��RAbRX�\\*���$���S�\r\n�W�E���9�jʆ�&�\r\n��� �KR���s��3�Jt,����JRS�A��Q�@|cldb`lajhhWQ�XT�h?��!]��\r\n                                                         r\r\n                                                          �T�AK���9�\r\n`-P`\r\nCa��%�� '�]>\r\n            ��0Գ4�=���y%�z�P�$�'���5pQ$�4 ���h䚠hG�&d�/�-+�0`u!B�|�\r\n��V~IFjQ@F>�͢�adh��`dl�khld\r\n                          1P\tw�\r\n                                  \"_�Y���Dj���o7�K~X�][��µ�(���A�e~N~zfU*�(M̫U��ye�y��yɩ:\r\nI�%\r\n��\r\n�E�\r\n�Z�$�R�4��K��s�KsKR*�K��=P��#�K����?���P��\t���%{y*�v��/�L�����1�� l8��Aܟ����\r\n�\r\nP����nlA�@�ĩ�؂d%X��*�P^D��2����{�4<`�'h\r\n                                       vG�N�`5E��ٮ����$�i3;T&f���j*%�Z�CP\r\n    at _jsonParse (/Users/z001hgg/Documents/shaik/Service/node_modules/frisby/lib/frisby.js:1219:11)\r\n    at Frisby.<anonymous> (/Users/z001hgg/Documents/shaik/Service/node_modules/frisby/lib/frisby.js:950:20)\r\n    at null.<anonymous> (/Users/z001hgg/Documents/shaik/Service/node_modules/frisby/lib/frisby.js:1112:18)\r\n    at Timer.listOnTimeout (timers.js:92:15)\r\n\r\nhence I am using after(function(err,res,body) instead of afterJSON(function(json))\r\neven expectJSON(201) is throwing an error.\r\n\r\nany suggestions please??"},"comment":{"url":"https://api.github.com/repos/vlucas/frisby/issues/comments/160229056","html_url":"https://github.com/vlucas/frisby/issues/286#issuecomment-160229056","issue_url":"https://api.github.com/repos/vlucas/frisby/issues/286","id":160229056,"user":{"login":"vlucas","id":187,"avatar_url":"https://avatars.githubusercontent.com/u/187?v=3","gravatar_id":"","url":"https://api.github.com/users/vlucas","html_url":"https://github.com/vlucas","followers_url":"https://api.github.com/users/vlucas/followers","following_url":"https://api.github.com/users/vlucas/following{/other_user}","gists_url":"https://api.github.com/users/vlucas/gists{/gist_id}","starred_url":"https://api.github.com/users/vlucas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vlucas/subscriptions","organizations_url":"https://api.github.com/users/vlucas/orgs","repos_url":"https://api.github.com/users/vlucas/repos","events_url":"https://api.github.com/users/vlucas/events{/privacy}","received_events_url":"https://api.github.com/users/vlucas/received_events","type":"User","site_admin":false},"created_at":"2015-11-28T00:20:54Z","updated_at":"2015-11-28T00:20:54Z","body":"Looks like maybe your response is g-zipped, and the current version of Frisby.js does not un-gzip response bodies by default."}}