http post multipart/form-data(解决)
Http = CreateObject("MSXML2.XMLHttp")Http.Open("Post","https://xxx.api",.F.)
Http.setRequestHeader("Content-Type","multipart/form-data;boundary=123456789")
lcpost = '--123456789'+chr(13)+chr(10)
lcpost = lcpost +'Content-Disposition: form-data; name="doc_title"'+chr(13)+chr(10)+chr(13)+chr(10)
lcpost = lcpost +'001'+chr(13)+chr(10)
lcpost = lcpost +'--123456789'+chr(13)+chr(10)
lcpost = lcpost +'Content-Disposition: form-data; name="doc_type"'+chr(13)+chr(10)+chr(13)+chr(10)
lcpost = lcpost +'1'+chr(13)+chr(10)
lcpost = lcpost +'--123456789--'+chr(13)+chr(10)
Http.send(lcpost)
cfhxx = Http.ResponseText
[此贴子已经被作者于2020-11-6 16:54编辑过]