本文整理自网络,侵删。
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 android实例-红外线操作(xe10.2+小米5)
更多相关阅读请进入《Delphi》频道 >>