~unity-2d-team/unity-2d/Shell-MultiMonitor

« back to all changes in this revision

Viewing changes to grackle/client.py

  • Committer: William Grant
  • Date: 2012-01-20 08:26:17 UTC
  • Revision ID: william.grant@canonical.com-20120120082617-4t3zdb532je063j4
A little bit of server.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 
3
3
def put_message(archive_name, file_obj):
4
4
    connection = httplib.HTTPConnection('localhost', 8435)
5
 
    connection.request('POST', 'foo', file_obj.read())
 
5
    connection.request('POST', '/archive/%s' % archive_name, file_obj.read())
6
6
    response = connection.getresponse()
7
7
    data = response.read()
8
8
    if response.status == httplib.BAD_REQUEST: