danwrong / restler

REST client library for node.js
MIT License
1.99k stars 391 forks source link

trim incoming data before trying to parse it as json to make sure there ... #208

Open prusik opened 9 years ago

prusik commented 9 years ago

...is something to parse.

As context, I need this in an integration with the GetHarvest API, where they use restler but return " " (empty string with space) in their response. Ideally I would prefer that they do the fix on their side, however since it is not open source I feel like this would take forever. I have added the fix and included a test.

issue: https://github.com/danwrong/restler/issues/207

thanks!

ryedog commented 9 years ago

Wish this would get merged, as having the same issue. @prusik you may want to remove your package.json changes from the PR to make it easier on them (otherwise they have to change it after they merge)

easternbloc commented 9 years ago

@ryedog I'm afraid it can't get merged until it's been rebased.

Also @prusik if you would like the PR merged please remove the package bump. I'll manage that from this side. THX :)

prusik commented 9 years ago

Ok so I removed the modifications I made to the package.json. Sorry this was my first pull request. If there is anything else I can do, please let me know.

easternbloc commented 9 years ago

hi can you just rebase out anything to do with the package.json so to get rid of those last 3 commits do something like:

git rebase -i HEAD~4 then in the interactive rebase delete those 3 commits and save

it should remove them and you can force push the changes back to your repo.

Cheers.

prusik commented 9 years ago

Sorry but I have no clue how to rebase and have no more time for this now. I did try but was unsuccessful.

easternbloc commented 9 years ago

No worries. Let me know when you manage to rebase it and I can merge this in. I need to keep the commits clean so it can't go in as it is at the moment I'm afraid.

Thanks.