在接口传输时,调用创建等操作,默认创建的数据会成英文的。
但是需求是传输中文的数据,此时仔细检查,可以发现是接口请求头的问题。
请求头需要额外设置以下参数,否则默认语言格式就是英文的
'Cookie':'frontend_lang=zh_CN;'
一般通用请求头长这样:
__headers = {
'Content-Type': 'application/json',
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.106 Safari/537.36',
'Cookie':'frontend_lang=zh_CN;'
}