Jump to content

mjustin

Members
  • Content Count

    80
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by mjustin


  1. There is a specific implementation for writing Indy raw data to a log file, TIdInterceptSimLog in unit IdInterceptSimLog.

     

    Intercept := TIdInterceptSimLog.Create;
    Intercept.Filename := (create the file name);

    Your implementation uses the abstract class TIdLogEent, which is an abstract class, because it does not implement the abstract methods of its parent class TIdLogBase,
     

     


  2. PSP leaves most tax related things to the seller (you). BlueSnap says "Most BlueSnap customers are responsible for collecting taxes themselves. For guidance, please contact a tax specialist.".

    For oversea sales, other companies, which also do all tax related processing, might save you some time and money.


  3. 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.


  4. dj.png.2c8e760d521a512fc6d60fda3571b35f.png.bfe805984b9d2f6a0b70b57dde2fe6f4.png

     

    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

    • Like 3

  5. Daraja HTTP Framework

     

     

    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

     

    • Like 1
×