danwrong / restler

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

Added postJson and putJson to the Service wrapper prototype #212

Open zipang opened 9 years ago

zipang commented 9 years ago

The first thig that i tried.... create a service wrapper for a JSON API (which API is not JSON today?) and... bingo.. it was missing..!

cmhuynh commented 8 years ago

I landed on the main page/documentation and encountered the issue as well. It costed some investigation into restler source until later I found this bug.

zipang commented 8 years ago

Did you try my fork for that purpose ?

cmhuynh commented 8 years ago

My current solution is a common class that extends restler to provide postJson and putJson. I intended to made a small contribution back, then I found this PR, so just comment. I think this fix worths a review/merge, rather than a fork, in order to fix the "first impression". The restler documentation shows an example of postJson that does not exist. On Sep 12, 2015 3:22 AM, "Christophe Desguez" notifications@github.com wrote:

Did you try my fork for that purpose ?

— Reply to this email directly or view it on GitHub https://github.com/danwrong/restler/pull/212#issuecomment-139653415.

easternbloc commented 8 years ago

Could you update the docs to list the support of this method?

Can you add a simple test for coverage?

Thanks :lollipop: