This character, for example, how to do?
Param. Add (' info="access_token" : "430501 ee7a824ec79415b79e0653ca54" ');
Param. Add (' basicInfo="vehicleplatenumber" : "e001a", "companyname" : "eeee", "vin" : "2321", "repairdate" : "20181020", "repairmileage" : "20000", "settledate" : "20181023", "faultdescription" : "3333", "costlistcode" : "e20410" ');
Like this? Player can answer
CodePudding user response:
To submit the json format?CodePudding user response:
Send the postdata:='{info: {" access_token ":" 430501 ee7a824ec79415b79e0653ca54 "} basicInfo: {" vehicleplatenumber ":" e001a ", "companyname" : "eeee", "vin" : "2321", "repairdate" : "20181020", "repairmileage" : "20000", "settledate" : "20181023", "faultdescription" : "3333", "costlistcode" : "e20410"}}';Postd:=tstringstream. Create (");
Try
Postd. WriteString (send. Postdata);
HTTP. Request. ContentLength:=postd. Size;
HTTP post (send url, postd, response);
The finally
Postd. Free;
end;
CodePudding user response:
What type of data is the send? How to define?CodePudding user response:
Sendrecord=recordWord: integer;
Num: string;
Url: string;
Host: string;
Refer: string;
Useragent: string;
Accept: string;
Myheader: string;
Cookie: a string;
Postdata: string;
Acceptencoding: string;
Contenttype: string;
ProxyServer: string;
ProxyPort: integer;
Image: tmemorystream;
Yzm: string;
Tag: a string;
end;
Var
Send: sendrecord;
You don't need to use record, direct url and postdata two parameters is ok,