1.1 --- a/MoinMessage.py Sat Jun 22 02:08:15 2013 +0200
1.2 +++ b/MoinMessage.py Tue Jun 25 18:28:44 2013 +0200
1.3 @@ -416,9 +416,12 @@
1.4 else:
1.5 message["Date"] = datestr
1.6
1.7 -def sendMessage(message, url):
1.8 +def sendMessage(message, url, method="PUT"):
1.9
1.10 - "Send 'message' to the given 'url."
1.11 + """
1.12 + Send 'message' to the given 'url' using the given 'method' (using PUT as the
1.13 + default if omitted).
1.14 + """
1.15
1.16 scheme, host, port, path = parseURL(url)
1.17 text = message.as_string()
1.18 @@ -431,7 +434,7 @@
1.19 raise MoinMessageError, "Communications protocol not supported: %s" % scheme
1.20
1.21 req = cls(host, port)
1.22 - req.request("PUT", path, text)
1.23 + req.request(method, path, text)
1.24 resp = req.getresponse()
1.25
1.26 if resp.status >= 400: