1, the service side:
DataSnap Server side I wrote a class, the class contains tidhttp this component, and then based on the component made of a third party web site login and related operation
2, the client:
To compatibility problems, adopt the way of HTTP test, such as (this is you can get the correct verification code data) :
IdHTTP1. Get (' http://localhost/datasnap/rest/tservermethods1/GetCheckCode ', Stream1);
:
1, I am in call server GetCheckCode this method for the first time, I wrote on the server side of the class to create (class contains TIDHTTP), you can use this class directly behind, actually otherwise, when I called again I found I created in front of the class is nil, is this why, is there any way to meet my requirement
to
The primary purpose of 1, I actually is the way in using HTTP client, call me middle layer interface, the middle layer to a third party website and return the corresponding authentication code and data, such as: in the middle tier I write a csdn.net captcha interface, the login interface, Posting interface, etc., many clients can go to call the interface to get verification code of csdn.net, log in using the login interface, such as post operation, does not interfere with each other,
CodePudding user response:
The best way to reading DataSnap data from the Web, is to return a JSON characters, decompose the data again,CodePudding user response:
Site returned authentication code and data returned in the form of what? A string or a JSON,CodePudding user response:
Verification code returns the TStream, can normal received!