Jump to content

mjustin

Members
  • Content Count

    3
  • Joined

  • Last visited

Community Reputation

4 Neutral

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. A simple way is to declare a new class, which has a private field IdTCPServer of type TIdCustomTCPServer and a method which matches the signature of the IdTCPServer.OnExecute event handler: TMyClass = class(TObject) private IdTCPServer: TIdCustomTCPServer; procedure MyOnExecute(AContext: TIdContext); public constructor Create; destructor Destroy; override; procedure Run; ... constructor TMyClass.Create; begin IdTCPServer := TIdCustomTCPServer.Create; IdTCPServer.OnExecute := MyOnExecute; end; Instantiate this class and let it create, configure and start the IdTCPServer instance.
  2. The develop branch of the Daraja HTTP Framework includes a new tutorial with the full source code for a web server application which implements OAuth 2.0 authorization to access Google APIs. The example calls the Google Drive API to display the result of a ‘files’ request, which contains the files on the My Drive page of the user account in JSON format. Requirements: * Google account (with access to the developer console) * a Google API project with an OAuth 2.0 client ID * the client_secret.json file with the project configuration * OpenSSL DLLs * Lazarus 2.0 or Delphi 2009+ * SuperObject (for Delphi) More information: Google API access with OAuth 2.0 authorization for Daraja HTTP Server Applications (full source code) About Daraja HTTP Framework: * GitHub: https://github.com/michaelJustin/daraja-framework * Wiki: https://github.com/michaelJustin/daraja-framework/wiki * API Docs: http://michaeljustin.github.io/daraja-framework/ Happy coding, Michael Justin
  3. The Daraja HTTP Framework is a free open source library for Object Pascal (Free Pascal 3.0.4, Delphi 2009+), based on the stand-alone HTTP server component in Internet Direct (Indy). The 1.2.5 release improves UTF-8 support for Free Pascal by “using” the LazUTF8 unit. More information Home page: https://www.habarisoft.com/daraja_framework.html API documentation: https://www.habarisoft.com/daraja_framework/1.2/docs/api/ Getting started PDF: https://www.habarisoft.com/daraja_framework/1.2/docs/DarajaFrameworkGettingStarted.pdf GitHub: https://github.com/michaelJustin/daraja-framework Wiki: https://github.com/michaelJustin/daraja-framework/wiki
×