I have a function in my JavaScript that makes an Ajax request for the REST interface of a Floodlight controller.
function excluir(nome)
{
var jsonExclui = ("{" + '"name": "'+nome+'" }');
alert(jsonExclui);
$.ajax(
{
url: "http://192.168.56.99:8085/wm/staticflowpusher/json",
method: "DELETE",
// type: 'DELETE',
data: jsonExclui,
dataType: "json",
success: function(data)
{
alert(data.status);
},
error: function(data)
{
alert("Deu erro : "+data.status);
}
});
}
The DELETE method is supported and is documented in the SDN driver documentation.
But when analyzing the browser console I noticed that it tells me that I am sending OPTIONS and not DELETE.
Accept-Ranges: Allow bytes: DELETE, POST Connection: keep-alive Content-Type: application / json Date: Thu, 14 May 2015 11:46:43 GMT Server: Restlet-Framework / 2.3.1 Transfer-Encoding: chunked Remote Address: 192.168.56.99: 8085 Request URL: link Request Method: OPTIONS Status Code: 405 Method Not Allowed
Is this common?