RequestResult.txt 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. 以下为终端输出,实际输出以环境及接口改动为准
  2. --------------------
  3. Request: 1
  4. head Server: nginx/1.8.0
  5. Date: Sun, 19 Feb 2017 13:17:36 GMT
  6. Content-Type: application/json;charset=utf-8
  7. Transfer-Encoding: chunked
  8. Connection: close
  9. X-Powered-By: PHP/5.3.5
  10. state 200
  11. result {u'msg': u'', u'data': {u'content': u'dogstar\u60a8\u597d\uff0c\u6b22\u8fce\u4f7f\u7528PhalApi\uff01', u'version': u'1.3.5', u'time': 1487510256, u'title': u'Hello World!'}, u'ret': 200}
  12. --------------------
  13. Request: 2
  14. head Server: nginx/1.8.0
  15. Date: Sun, 19 Feb 2017 13:17:36 GMT
  16. Content-Type: application/json;charset=utf-8
  17. Transfer-Encoding: chunked
  18. Connection: close
  19. X-Powered-By: PHP/5.3.5
  20. state 200
  21. result {u'msg': u'\u975e\u6cd5\u8bf7\u6c42\uff1a\u7f3a\u5c11\u5fc5\u8981\u53c2\u6570user_id', u'data': [], u'ret': 400}
  22. --------------------
  23. Request: 3
  24. head Server: nginx/1.8.0
  25. Date: Sun, 19 Feb 2017 13:17:37 GMT
  26. Content-Type: application/json;charset=utf-8
  27. Transfer-Encoding: chunked
  28. Connection: close
  29. X-Powered-By: PHP/5.3.5
  30. state 200
  31. result {u'msg': u'', u'data': {u'content': u'PHPer\u60a8\u597d\uff0c\u6b22\u8fce\u4f7f\u7528PhalApi\uff01', u'version': u'1.3.5', u'time': 1487510257, u'title': u'Hello World!'}, u'ret': 200}
  32. --------------------
  33. Request: 4 (illegal request)
  34. Traceback (most recent call last):
  35. File "/Users/gaoyiping/Documents/git.oschina.net/PhalApi/SDK/Python/PhalApiClient/python2.x/demo.py", line 26, in <module>
  36. result = PhalApiClient.PhalApiClient(1, 2, 3, 4)
  37. File "/Users/gaoyiping/Documents/git.oschina.net/PhalApi/SDK/Python/PhalApiClient/python2.x/PhalApiClient.py", line 6, in PhalApiClient
  38. url = host + ('' if service is None else ('?service=' + service))
  39. TypeError: cannot concatenate 'str' and 'int' objects