本文整理自网络,侵删。
SS := TStringStream.Create('', TEncoding.UTF8); HttpClient := TIdHttp.Create(); MutPartForm := TIdMultiPartFormDataStream.Create; try MutPartForm.AddFormField('unitCode', UnitCode); MutPartForm.AddFormField('regCode', RegCode); MutPartForm.AddFile('data', 'data.zip', GetMIMETypeFromFile('data.zip')); HttpClient.Post(Url, MutPartForm, SS); response := SS.DataString; finally SS.Free; HttpClient.Free; MutPartForm.Free; end;
相关阅读 >>
Delphi 清除ie缓存 internet临时文件 cookie 历史记录 表单记录 上网密码
Delphi环境下基于spcomm控件开发串口通讯报文字节丢失的问题解决
Delphi 获取本机 hostname ip address
更多相关阅读请进入《Delphi》频道 >>