Home > Back-end >  Delphi7 post how many arguments
Delphi7 post how many arguments

Time:09-15

{info: {" access_token ":" 430501 ee7a824ec79415b79e0653ca54 "} basicInfo: {" vehicleplatenumber ":" e001a ", "companyname" : "eeee", "vin" : "2321", "repairdate" : "20181020", "repairmileage" : "20000", "settledate" : "20181023", "faultdescription" : "3333", "costlistcode" : "e20410"}}


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;
The end;

CodePudding user response:

What type of data is the send? How to define?

CodePudding user response:

Sendrecord=record
Word: 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;
The end;
Var
Send: sendrecord;
You don't need to use record, direct url and postdata two parameters is ok,
  • Related