希望接收GET请求的json响应。Postman给了我json数据。但当我以编程方式执行时,它返回空html

希望接收GET请求的json响应。Postman给了我json数据。但当我以编程方式执行时,它返回空html,json,python-2.7,Json,Python 2.7,我得到的输出: import requests import json #Infrastructure API URL url = "http://10.39.188.69/server-manager/tomcat/bimws/rest/v1/infrastructures/?format=json" myResponse = requests.get(url, headers=headers, verify=False) print myResponse p

我得到的输出:

import requests
import json

#Infrastructure API URL
    url = "http://10.39.188.69/server-manager/tomcat/bimws/rest/v1/infrastructures/?format=json"
    myResponse = requests.get(url, headers=headers, verify=False)
    print myResponse
    print(myResponse.status_code)
    #print(myResponse.text)
    print(myResponse.json)
c:\automation>python rest\u API.py
C:\Python27\lib\site-
packages\requests\packages\urllib3\connectionpool.py:852:
nsecureRequestWarning:正在发出未验证的HTTPS请求。添加
强烈建议进行证书验证。见:
https://urllib3.readthedocs.io/en/late/advanced-usage.html#ssl-警告
不安全(警告)
C:\Python27\lib\site packages\requests\packages\urllib3\connectionpool.py:852:
nsecureRequestWarning:正在发出未验证的HTTPS请求。添加证书
e强烈建议进行验证。见:https://urllib3.readthedocs.io/en/late
t/advanced usage.html#ssl警告
不安全(警告)

尝试执行myResponse.json()。myResponse.json返回instancemethod类型,而myResponse.json()将返回json数据。

Response.json()没有帮助。Get-Valueerror:无法解码json对象。能否打印myResponse的类型。它返回的打印类型(myResponse)尝试以下操作:rs=grequests.get(url,headers=headers,verify=False)resp=grequests.map(rs)打印类型(resp[0].json())
    c:\automation>python rest_API.py
    C:\Python27\lib\site-
    packages\requests\packages\urllib3\connectionpool.py:852:
    nsecureRequestWarning: Unverified HTTPS request is being made. Adding 
    certificate verification is strongly advised. See: 
    https://urllib3.readthedocs.io/en/late/advanced-usage.html#ssl-warnings
  InsecureRequestWarning)
C:\Python27\lib\site-packages\requests\packages\urllib3\connectionpool.py:852:
nsecureRequestWarning: Unverified HTTPS request is being made. Adding certifica
e verification is strongly advised. See: https://urllib3.readthedocs.io/en/late
t/advanced-usage.html#ssl-warnings
  InsecureRequestWarning)
<Response [200]>
<bound method Response.json of <Response [200]>>