private function attachRequestPayload(&$ch, $data)
    {
        $encoded                    = json_encode($data);
        $this->last_request['body'] = $encoded;
        curl_setopt($ch, CURLOPT_POSTFIELDS, $encoded);
    }
private function attachRequestPayload(&$ch, $data)
    {
        $encoded                    = json_encode($data);
        $this->last_request['body'] = $encoded;
        curl_setopt($ch, CURLOPT_POSTFIELDS, $encoded);
    }
private function attachRequestPayload ( & $ ch , $ data ) { $ encoded = json_encode ( $ data ) ; $ this -> last_request [ 'body' ] = $ encoded ; curl_setopt ( $ ch , CURLOPT_POSTFIELDS , $ encoded ) ; }
Encode the data and attach it to the request

@param   resource $ch   cURL session handle, used by reference
@param   array    $data Assoc array of data to attach
Encode the data and attach it to the request