protected function postfields($data) { if (is_object($data) || is_array($data)) { return http_build_query($data); } else { return $data; } }