import urllib2

import sublime

import shared as G

def create_room(room_name):
    url = 'https://%s/api/room' % G.DEFAULT_HOST
    # TODO: let user specify permissions
    post_data = {
        'username': G.USERNAME,
        'secret': G.SECRET,
        'name': room_name
    }
    urllib2.urlopen(url, data=post_data, timeout=5)

@@ -1,12 +1,24 @@
+from urllib 
 import urlli
@@ -19,21 +19,22 @@
  url
-lib2%0A
+encode
 %0Aimport 
 subl
@@ -33,15 +33,15 @@
 ort 
-sublime
+urllib2
 %0A%0Aim
@@ -58,16 +58,17 @@
 d as G%0A%0A
+%0A
 def crea
@@ -317,16 +317,26 @@
 l, data=
+urlencode(
 post_dat
@@ -336,16 +336,17 @@
 ost_data
+)
 , timeou

Encode post data