HttpQuery functions can pass header, PostData, etc. How can I pass body?
bwxiaokI've seen your blog post about the cabbage harvester strategy, and I have a question, can I send you a message?
JI was confused when I found out that the document header could be defined by itself after the post. After testing HttpQuery using the appliance/json appliance, no problem. Thank you for your help!
Inventors quantifiedHi, no problem with the test, it's probably the site that converted the Content-Type to the HTTP header "application/x-www-form-urlencoded".
The grassPostData is that.
JYes, the problem is solved, thank you!
Inventors quantifiedIf you look at the API documentation, HttpQuery is a header header that can be customized.
JThank you for your help! Yes, the HttpQuery POST method implemented by this site uses the default method "application/x-www-form-urlencoded" The default mode is "application/x-www-form-urlencoded". The command line: curl -X POST -d 'Test=12' -v -i 'https://ptsv2.com/t/tcj88-1566874165/post' The result of the run: https://ptsv2.com/t/tcj88-1566874165/d/399480296 Or: curl -X POST -H 'Content-Type: application/x-www-form-urlencoded' -d 'Test=123' -v -i 'https://ptsv2.com/t/tcj88-1566874165/post' This is a list of all the different ways Curl is credited in the database. The results of the run: https://ptsv2.com/t/tcj88-1566874165/d/374760737 In this mode, the data received by the server is reflected in the Parameters section. POST can also be used to submit data using the application/json query, "multipart/form-data", etc., as long as the Content-Type of the data header is changed. The command line: curl -X POST -H "Content-Type: application/json" -d {"test":"1234"} 'https://ptsv2.com/t/tcj88-1566874165/post' The results of the run: https://ptsv2.com/t/tcj88-1566874165/d/374760773 In this mode, the data received by the server is represented in the Body section. The command line: curl -X POST -H "Content-Type: multipart/form-data; boundary=---------------------BOUNDARY" -d $'----------------------BOUNDARY\r\nContent-Disposition: form-data; name="Test"\r\n\r\n12345\r\n-----------------------------BOUNDARY--\r\n' 'https://ptsv2.com/t/tcj88-1566874165/post' This is a list of all the commands that can be used to create a form. The results of the run: https://ptsv2.com/t/tcj88-1566874165/d/380571003 In this mode, the data received by the server is represented in Multipart Values or Multipart Files. Please ask the site administrator to add a customization to the Content-Type of the file header by using the HttpQuery function, or allow the "application/json query to submit data".
JPostData passes the parameters, not the body. You can verify this via https://ptsv2.com var query = HttpQuery (('https://ptsv2.com/t/tcj88-1566874165/post', 'a=1&b=2&c=3') Log ((query)) The result is here: https://ptsv2.com/t/tcj88-1566874165/d/387920759