In the save() method on a model, I need to execute a request for an external URL, e.g.
def save(self):
curl http://foo.dyndns.com/blah
I don’t need it to return or handle any received data – just need to make the request (an Arudino board will receive and react to the request).
I’d prefer not to drop into os.system() to execute a curl statement – I’m thinking there must be some way to do this natively. Only I don’t know how (Google results not helping much here).
Thanks for suggestions.
Open a request with urllib2.urlopen, but don’t
.readfrom the handler