def getAccessToken(self, params): res = XMHttpClient.get(self, self.OAUTH2_PATH['token'], params) jsonObject = XMHttpClient.safeJsonLoad(self, res.read()) return jsonObject
def getErrCode(self, params): res = XMHttpClient.get(self, '', params) data = res.read() jsonObject = XMHttpClient.safeJsonLoad(self, data) return jsonObject
def postErrCode(self, params): res = XMHttpClient.post(self, '', params, header={'content-type':'text/plain'}) jsonObject = XMHttpClient.safeJsonLoad(self, res.read(),) return jsonObject