Home > Back-end >  Datasnap server idhttp problem
Datasnap server idhttp problem

Time:09-20

:
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!

refer to the second floor juno_393 response:
site to return to the authentication code and data returned in the form of what? String or a JSON,

CodePudding user response:

reference 1st floor lyhoo163 response:
the best way to reading DataSnap data from the Web, is to return a JSON characters, decompose the data again,


Thank you very much for your reply, I am TStream returned data, can be normal receipt, return JSON can also be done, but my client access layer, middle layer and access to the third party sites, this is not a session, will be broken, if broken, the third party will not acknowledge sending a verification code and the login information,

CodePudding user response:

reference 1st floor lyhoo163 response:
the best way to reading DataSnap data from the Web, is to return a JSON characters, decompose the data again,


How much do you QQ, I add you
  • Related