Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Catalog · How the catalog works

Random project

horse-utils-clientip

Basic functions for Horse.

View on GitHub

Anyone may press Interesting, signed in or not. It helps others find this project.

Member rating

No ratings yet.

Sign in to rate this project.

README

Horse-Utils-ClientIP

Support: developer.dlio@gmail.com

Basic functions for Horse.

For install in your project using boss:

bash
$ boss install github.com/dliocode/horse-utils-clientip

Usage

Capture the client's IP:

delphi
uses
  Horse,
  Horse.Utils.ClientIP;

begin
  THorse.Get('ping',
    procedure(Req: THorseRequest; Res: THorseResponse; Next: TProc)
    begin
      Res.Send(ClientIP(Req));
    end);

  THorse.Listen(9000);
end.

License

MIT © Danilo Lucas