Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- procedure TForm1.Button1Click(Sender: TObject);
- var
- lJSO : String;
- lRequest: TStringStream;
- JValue: TJSONValue;
- LJsonObj : TJSONObject;
- begin
- // These are the parameters for login into the server
- // lJSO := '{"email":"admin@ceb.com","password":"admin", "rememberMe" : "true" }';
- SimpleAuthenticator.Username := 'admin@ceb.com';
- SimpleAuthenticator.Password := 'admin';
- RESTClient.BaseURL := 'http://mobility.interclip.com:8080/mobility-sfe/api/index.xhtml#!/authentication/login';
- RESTRequest.Params[0].Name := 'email';
- RESTRequest.Params[0].Value := 'admin@ceb.com';
- RESTRequest.Params[1].Name := 'password';
- RESTRequest.Params[1].Value := 'admin';
- RESTRequest.Params[2].Name := 'rememberMe';
- RESTRequest.Params[2].Value := 'True';
- RESTRequest.Execute;
- // ShowMessage( IntToStr( RESTResponse.StatusCode ) );
- if assigned(RESTResponse.JSONValue) then
- memo1.Lines.Text := TJson.Format(RESTResponse.JSONValue);
- end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement