launchpad-dev team mailing list archive
-
launchpad-dev team
-
Mailing list archive
-
Message #07520
Re: A draft microservice for gpg verification
On 4 July 2011 18:14, Stuart Bishop <stuart.bishop@xxxxxxxxxxxxx> wrote:
[...]
> In fact, I still can't work out how to send a request to this server
> from Python...
I haven't actually *tried* it, but the following ought to work:
response = urllib2.urlopen(
"http://service.address/", data=data_to_check)
if 200 <= response.code <= 299:
result = bson.loads(response.read())
else:
raise DeadKitten(response.code, response.read())
Follow ups
References