danwrong / restler

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

Sending compressed JSON data #240

Open colinbes opened 8 years ago

colinbes commented 8 years ago

I've got myself confused here and am looking for some direction. I am wanting to send compressed json data via POST verb.

Is there a RESTLER supplied method/option for automatically doing this? Seems the postJSON only support JSON object and I don't see options fields to compress data.

If I am to do this manually, do I manually set content-type to application/json and what would be best method for compressing my json string - I assume this would now need to be a string in order to pipe to some compression function.

THanks