Skip to content

Latest commit

 

History

History
29 lines (24 loc) · 1.07 KB

README.md

File metadata and controls

29 lines (24 loc) · 1.07 KB

Logo

Elect.Web.HttpDetection

Author Top Nguyen

Overview

  • Get Device information from User-Agent in header of the HttpRequest.
  • Device Info contain: Location base on IP Address, Device OS version and so on.

Installation

  • Package Manager
    PM> Install-Package Elect.Web.HttpDetection
    
  • .NET CLI
    dotnet add package Elect.Web.HttpDetection
    

See more information in Nuget.

Usage

  • HttpDetection work as HttpRequest extensions.
    var deviceInfo = HttpRequest.GetDeviceInformation();
  • If you want to use HttpDetection in Service Layer, please use "HttpContextMiddleware" from Elect.Web.Middlewaresto get HttpContext of the current request then call the extensions method.

License

Elect.Web.HttpDetection is licensed under the MIT License.