# Revision history [back]

Marcelo,

you can issue a DELETE with data, the same way you would with a POST. Not sure how you are sending your REST calls, but with curl you would just make the request DELETE (-X delete) and pass the flow data with --data-binary.

I have not tried this with OpenDaylight, but hoping it's as simple as that.

Marcelo,

you can issue a DELETE with data, the same way you would with a POST. Not sure how you are sending your REST calls, but with curl you would just make the request DELETE (-X delete) and pass the flow data with --data-binary.

I have not tried this with OpenDaylight, but hoping it's as simple as that.

here is the python code. I took it from a library I've used for a different controller platform, trimmed it down for brevity and modified it a bit to hopefully work with OpenDaylight (Bearer header, for example), but I have not tried it. Hopefully you can get it to work:

import urllib2
from urllib2 import HTTPError

def genericREST(method,url,data,xAuthToken,debug=False):
req = urllib2.Request(url, data)
try:
req.get_method=lambda: method
if xAuthToken != None: