Skip to content

Latest commit

 

History

History

LaserCatEyes.HttpClientListener

LaserCatEyes DotNet SDK - currently in BETA program

.NET

LaserCatEyes.HttpClientListener

Laser Cat Eyes is a network monitoring tool that helps mobile app developers diagnose issues between their apps and backend services.

you can use dotnetstandart SDK's if your app is running under .netcore 3.1

Installation & Implementation of HttpClient Listener

  1. LaserCatEyes is available through Nuget. First, install NuGet. Then, install LaserCatEyes.HttpClientListener from the package manager console:
PM> Install-Package LaserCatEyes.HttpClientListener
  1. In Startup class ConfigureServices method inject add Endpoint Listener

To listen all HttpClients

    public void ConfigureServices(IServiceCollection services)
    {
        if (CurrentEnvironment.IsDevelopment()) //This is a debugging tool, you don't want to run it in production, right!?
        {
            //Seriously don't run it in production environment 
            services.AddLaserCatEyesHttpClientListener(MY_APP_KEY_FROM_LASER_CAT_EYES_PORTAL);
            services.AddLaserCatEyesHttpClientListener(option =>
            {
                option.AppKey = "";
                option.AspCoreEnvironment = "";
                option.Version = "1.2.3.4";
                option.BuildNumber = "1";
            });
        }
    }

or

Listen only selected HttpClients

    public void ConfigureServices(IServiceCollection services)
    {
        if (CurrentEnvironment.IsDevelopment()) //This is a debugging tool, you don't want to run it in production, right!?
        {
            //Seriously don't run it in production environment 
            services.AddLaserCatEyesHttpClientListener(MY_APP_KEY_FROM_LASER_CAT_EYES_PORTAL, listenAllHttpClients: false);
            services.AddHttpClient("myClient", c =>
            {
                //your settings
            }).AddHttpMessageHandler<LaserCatEyesHttpMessageHandler>();
        }
    }

Author

Betalgo, [email protected]