I am working with CodeIgniter Rest server, I am making PUT request . Everything works fine in the chrome and firefox, but in the internet explorer I keep getting an error saying Request method PUT was not present in the Access-Control-Allow-Methods list., i even added the response headers to allow the different methods , following is the rest service
public function service_put()
{
if (!$this->_allow) return;
$data = $this->_put_args;
if(isset($data))
{
// have my arguments
try{
header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Methods: POST,PUT,GET,DELETE');
header('Access-Control-Allow-Headers: Origin,X-Requested-With,Content-Type, Accept');
$this->response(['done' => TRUE], REST_Controller::HTTP_OK); // (200) HTTP response code
}
catch(Exception $e)
{
$this->response(array('error' => $e->getMessage()), $e->getCode());
}
return;
}
else
{
$this->returnBadRequest();
return;
}
}