def test(request): """ test request """ parms = { 'servername': '192.168.30.127', 'port': 5000, } # print request.__class__.__bases__ url = 'http://%(servername)s:%(port)d/' % parms hpc = HandlePycurl() context = hpc.getData(hpc.initCurl(), url) return HttpResponse(context)
def obtaindetailUserByName(request): """Gets detailed information about a specified user by user name. Mothod:GET """ parms = { 'servername': '192.168.30.127', 'port': 5000, 'uri': '/v.2.0/users?name=' } url = 'http://%(servername)s:%(port)d%(uri)s' % parms hpc = HandlePycurl() context = hpc.getData(url) return HttpResponse(context)