数据表Ajax请求进入Codeigniter控制器

I am trying to send last value (af) of this URL www.example.com/country/AF.html through AJAX data and want to read this data in Codeigniter Controller but unable to retrieve data. Please help

Datatable Ajax Code

$(document).ready(function() {
    var UserURL = window.location.href.split("/").pop();
    var newurl = UserURL.split("/").slice(-1).join().split(".").shift();
    $('#countryiptable').DataTable({
        "pageLength": 50,
        "info": false,
        "processing": true,
        "serverSide": true,
        'ajax': {
            'url': "country/getlist",
            "type": "POST",
            "data":{"country_code": newurl},
            "dataType": "json",
            "dataSrc": function (jsonData){
                return jsonData.data;
            }
        }
    });
} );

and here is my Codeigniter Controller;

    public function getlist(){

        echo $this->input->post('country_code');
        $countryiso2    = strtoupper($this->input->post('country_code'));       
        //echo "hi";
        $list = $this->CountryModel->getCountry($countryiso2);

        $data = array();
        $no = $_POST['start'];
        foreach ($list as $iplist) {
        // print_r($data);die;
        $no++;
        $row = array();
        $row[] = $no;
        $row[] = $iplist->startip;
        $row[] = $iplist->registry_name;
        $row[] = $iplist->totalip;
        $row[] = $iplist->country_code;
        $row[] = $iplist->ip_type;

        $data[] = $row;

        //$_POST['draw']='';
        }

        $output = array(
            "draw" => $_POST['draw'],
            "recordsTotal" => $this->CountryModel->count_all(),
            "recordsFiltered" => $this->CountryModel->count_filtered(),
            "data" => $data,
        );
        //output to json format
       echo json_encode($output);
    }
}