allow specifying the content type of the data being posted/putted, so we can send JSON encoded data
when there's a status code error, return it in the callback function, and when the data format is unknown, still call the success callback (rather than the error one)