post 上传文件—Multipart类型代码实现:
import requests
from requests_toolbelt import MultipartEncoder
url = "http://test.***.cn/api/web/file/D0mgVb6grB3dsxkag0K87w/cover"
headers = {
'content-type': "multipart/form-data; boundary=----WebKitFormBoundaryDzEFEPtsX8NXD1sL",
'cache-control': "no-cache",
'Authorization': 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiIxNDUiLCJleHAiOjE2Njc4Nzk3NjcsImlhdCI6MTY2Nzg3MjUwNywiaXNzIjoiYm9zeXVuIiwic3ViIjoiZjVjNGEzNmMtMGNlNC00ZjVkLWJhYmYtNDQ5MGIyZjkwOWJjIiwiYWlkIjoiMTAxIiwiZWlkIjoiMSJ9.GxnNDMh-zfhk39o9aWM_v3-jrTJvc5v99tdIYTMu88c'
}
cover_name =