You are not logged in.
Pages: 1
I am new to this stuff and trying to pass login/password.
Should i do that before calling .Open?
vUsername := 'Dispatch';
vPassword := '1234';
vLogin := vUsername + ':' + vPassword;
vBase64 := TBase64Encoding.Create;
try
vAuth := 'Authorization: Basic ' + vBase64.Encode(vLogin);
finally
vBase64.Free
end;
FClient.HeaderAdd(vAuth);
FClient.Open('127.0.0.1', '8095');
result := FClient.Get(vURL);
Thanx alot.
Offline
Why are you not using the default available authentication classes?
Last edited by pvn0 (2019-01-31 11:16:51)
Offline
Why are you not using the default available authentication classes?
Because i have no idea about the framework yet and the classes it offers.
What classes should i use? Any sample code available?
Thanx.
Offline
Read the docs here : https://synopse.info/files/html/Synopse … 01.18.html.
After that you can go through the examples in the
SQLite3\Samples folder
Everything you need is described in the docs.
Last edited by pvn0 (2019-01-31 11:35:07)
Offline
I can not find any references to THttpClientSocket, neither in documentation nor samples.
What is the proper flow of method calls?
Should i use .Open constructor to specify the IP and port of the server and then use .Get and pass auth?
I end up with 505 error and i now see this is being raised inside THttpClientSocket.Request method.
Offline
If you're only interested in client-server side of mORmot then you can start reading here 11. Client-Server process, specifically I imagine you are interested in 11.4. Network and Internet access via HTTP where you can pick server/client classes based on your preference.
Read 21. Security about authentication. I strongly suggest you use the built-in framework authentication instead of rolling your own.
Offline
Pages: 1