Home > Back-end >  Delphi post submit questions
Delphi post submit questions

Time:11-14

The POST HTTP/1.1
http://www.xxxxxx.com/3/cgi/send_codeThe content-type: application/x - WWW - form - urlencoded; Charset=utf-8
The Content - Length: 25
Appid: 198300818
Sid: 8217 af346f46a7c3c8baff606182d7d6
Sig: ZlrFC7w1pRNgEqzHTtPEWwbuWLg
20190308145740 b39a96903f9434fec35371d467fa2d2401963422b7fbd9c0 Smdevicefp:
The user-agent: Dalvik/2.1.0 (Linux; U; Android 6.0.1; HUAWEI RIO - AL00 Build/HuaweiRIO - AL00)
Host: www.xxxx.com
Connection: Keep Alive -
The Accept - Encoding: gzip

Type=1 & amp; Name=8613286888199
Tip: {" MSG ", "parameter error", "ret" : 65532}


Idhttp1. Request. ContentType:='application/x - WWW - form - urlencoded; Charset=utf-8 ';
RStream:=TStringStream. Create (' type=1 & amp; Name=8613286888199 ');
Edit1. Text:=IdHTTP1. Post (' http://www.xxxxx.com/3/cgi/send_code ', RStream);

CodePudding user response:

Type=1 & amp; Name=8613286888199

Are you sure this is submitted by post instead of get?

CodePudding user response:

reference 1st floor fall demons _Delphi response:
type=1 & amp; Name=8613286888199

Are you sure this is submitted by post instead of get?



This is the post must be determined

CodePudding user response:

Should look to use the parameters of the json format

CodePudding user response:

Scratch with caught software, see your parameters for we know that we have the difference,
Request header looks like a pile of encrypted data...

CodePudding user response:

IdHTTP1 has a problem, before met a and Java backend interaction, urlDecode occur without decoding
Details: https://blog.csdn.net/pzx521521/article/details/80405783

Can use first PostMan/cUrl test is the cause of the Delphi,
Is with the native IXMLHTTPRequest
Not just check the reference

CodePudding user response:

I also met, so I'm using parameters directly? Even behind the address, the parameter is set to null, ~!

CodePudding user response:

Idhttp1. Request. ContentType:='application/x - WWW - form - urlencoded; Charset=utf-8 ';
RStream. Add (type='1');
RStream. Add (name='8613286888199');
//post method should pass parameters.
Edit1. Text:=IdHTTP1. Post (' http://www.xxxxx.com/3/cgi/send_code ', RStream);

CodePudding user response:

Check the normal headers have any special requirements
  • Related