{"issue":{"created_at":"2011-01-22T05:12:03Z","state":"open","updated_at":"2011-12-10T14:56:59Z","comments":2,"user":{"gravatar_id":"4e02b116468b283b50041e6ccf568b86","id":133356,"url":"https://api.github.com/users/juanchorossi","avatar_url":"https://secure.gravatar.com/avatar/4e02b116468b283b50041e6ccf568b86?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"juanchorossi"},"body":"Hi, \r\nIm trying to post using the goo.gl API, that needs application/json headers:\r\n\r\n$this->rest->post('urlshortener/v1/', json_encode(array('longUrl' => 'http://www.test.com')), 'application/json');\r\n\r\nThe third parameter isn't working. Ive tried setting through ->format but it doesn't work either. The only way I could this work was editing Curl library:\r\n\r\n\t\tif ( ! empty($this->headers))\r\n\t\t{\r\n\t\t\t$this->option(CURLOPT_HTTPHEADER, array('Content-type: application/json));\r\n\t\t}\r\n\r\nIs there any way to make this work?\r\nThanks in advance!","assignee":null,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"id":543206,"number":7,"labels":[],"title":"Setting post Content-Type","html_url":"https://github.com/philsturgeon/codeigniter-restclient/issues/7","closed_at":null,"url":"https://api.github.com/repos/philsturgeon/codeigniter-restclient/issues/7","milestone":null},"action":"created","comment":{"created_at":"2011-12-10T14:56:59Z","updated_at":"2011-12-10T14:56:59Z","user":{"gravatar_id":"454864d28e37b7a2f790a1edfa4ca02e","id":545595,"url":"https://api.github.com/users/munirehmad","avatar_url":"https://secure.gravatar.com/avatar/454864d28e37b7a2f790a1edfa4ca02e?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"munirehmad"},"body":"Is this issue related with my issue?\r\nhttp://stackoverflow.com/questions/8456951/whats-wrong-with-this-php-code-array-key-resets-automatically/","id":3091183,"url":"https://api.github.com/repos/philsturgeon/codeigniter-restclient/issues/comments/3091183"}}