Hello
To write an automatic login using IdHTTP, i usually analyze a site using Fiddler or HTTPAnalyzer tools and then i check the POSTS it sends and what kinda information it sends and i try to imitate that, recently i ran into problem with one of the sites i wanted to login to, this particular site didn't have any POST data but in the textview section i did see an unstandard json being sent (in HTTP Analyzer this was in the raw stream tab), something like this:
{user: "some user in base64 format", pass: "some password in base64 format"} and a few other parameters.
Because the json is unstandard i made it manually saved it in a file and then i assigned it to an TStringstream like this:
loader := TStringList.Create;
loader.LoadFromFile('jsonWithCustomFormat.txt');
jsonRequest := TStringStream.Create(loader[0], TEncoding.UTF8);
After that i set the refer to the login page and content type to 'application/json' like this :
idHttp.Request.Referer := 'myLoginPageURL';
idHttp.Request.ContentType := 'application/json'
Finally i sent the post
idhttp.Post(URL, jsonRequest, ms);
But i was unable to successfully login to the site ..., using what i just describe results in error:
https://i.stack.imgur.com/PGFml.jpgI also tried a few other combination of sending the POST but i was unsuccessful, i also made a question in Stackoverflow about this which didn't result in an answer after weeks, here is the link to the question
https://stackoverflow.com/questions/53906038/problem-with-login-using-idhttp-the-website-doesnt-send-any-username-and-passwIn the end due to the request from my client i am unable to share the site URL, but sharing it privately shouldn't be an issue, so if you really can't help me with the information i provided so far, please tell me so i can send you the URL to the site through a private messageI have been stuck solving this issue for a while so any tip help is much much appreciated !
Thanks.