import requests
def get_():
url = "http://127.0.0.1:9200/indextest/_mapping?pretty"
ss = requests.get(url)
print(ss)
print(ss.content)
d = json.loads(ss.content)
print(d)
return d
def post():
url = "http://127.0.0.1:9200/index/type/_mapping?pretty"
res = requests.post(url, data=json.dumps(get_()["index"]["mappings"]), json=d)
print(res)
print(res.content)