芒果六斤半

关注

Python 使用 requests post 读取的 json 的方法

芒果六斤半

关注

阅读 43

2023-06-06


def create_module_index(module_name):
    url = "http://localhost:9200/{}".format(module_name.lower())
    with open("./create_index.json", "r", encoding="utf-8") as file_object:
        json_obj = json.load(file_object)
        rep = session.put(url, json=json_obj)
        print(rep.status_code)
        print(rep.text)

1、python对json的操作总结

2、Python JSON
http://www.runoob.com/python/python-json.html


相关推荐

艾米吖

Python实战:使用requests通过post方式提交json数据

艾米吖 101 0 0

松鼠树屋

【python】requests模块post参数data和json的区别

松鼠树屋 53 0 0

码农K

【四二学堂】Requests库的post方法

码农K 42 0 0

伊人幽梦

java http的get、post、post json参数的方法

伊人幽梦 62 0 0

人间四月天i

ython requests 库中 POST 方法的使用及文档改进

人间四月天i 36 0 0

求阙者

requests (一): 发送一个 json 格式的 post 请求

求阙者 74 0 0

那小那小

python requests json中文

那小那小 37 0 0

楠蛮鬼影

解决 Python 3.5 中 requests 库 POST 请求 data 类型错误的方法

楠蛮鬼影 39 0 0

河南妞

python requests post和get请求,并把结果写入json文件中

河南妞 52 0 0

兽怪海北

python requests.post 指定header

兽怪海北 11 0 0

精彩评论(0)

0 0 举报