外部调用的时候可以 base64 传参么?
请
登录后发表观点

可以用 base64 传参
出错返回:{'status': 1, 'data': {'sourceId': '643f69617486b0331e216b74', 'msg': 'Cannot invoke "com.mingdao.workflow.instance.domain.Work.getAppType()" because "work" is null', 'instanceId': '643f69617486b0331e216b73'}, 'msg': '成功'}
import requests
posturl ="https://xxx.xxxx.com/api/workflow/hooks/NjQzZjYxZTY3NDg2YjAzMzFlMjE2NDU1/carqueery"
import base64
with open('C:/Users/Administrator/Desktop/yewu/1_信息采集使用授权及声明.pdf', 'rb') as f:
pdf_bytes = f.read() # read the PDF file in binary mode
pdf_base64 = base64.b64encode(pdf_bytes).decode() # convert the binary data to base64 string
data= {
'appKey':'f7c1xxx5a676aa090',
'sign':'ZDNhZxxxxxxxxxxxMyYWQ0ODBjZGYwNjIzYThlZDQyMDVlOGNiYWUwNTEyNGZiYTEyYQ==',
'username':'xx',
'authfile':pdf_base64,
'usercertNo':'xxxxxxxxxx'
}
re=requests.post(posturl,json = data)