requests的编码问题
2019-03-03 本文已影响0人
哪里有报刊亭
data2 = \
"""
{
"index" : {
"refresh_interval" : "-1"
}
}
""".encode("utf-8")
r=requests.put("http://localhost:9200/index/_settings",data = data2)
data2 = \
"""
{
"index" : {
"refresh_interval" : "-1"
}
}
""".encode("utf-8")
r=requests.put("http://localhost:9200/index/_settings",data = data2)