# -*-coding:utf8 -*-
import urllib
import urllib2
url ="http://xapi.kybyun.com/user/login"
headers ={}
headers = {
}
#定义请求数据,并且对数据进行赋值
data={}
data['appchg']='AppStore'
data['apptype']='21'
data['appver']='2.1.3.1'
data['email']='mushishi01'
data['isbind']='0'
data['passwd']='111111'
data['sysdev']='iPhone 6 plus'
data['sysver']='9.3'
data['uuid']='6ff7563dbd47c8077905c3920bc0d8b3'
#对请求数据进行编码及赋值
data=urllib.urlencode(data)
req=urllib2.Request(url, data,header)
#打开地址并且赋值给变量
requestResponse=urllib2.urlopen(request)
#读取服务端返回的数据
ResponseStr=requestResponse.read()
#打印数据
ResponseStr=ResponStr.decode("unicode_escape")
print(ResponseStr)