Laravel User Agent Rust
=======================

*v0.2.0*

Browser, platform, device and robot detection from the user agent, as a handler argument.

```
cargo add laravel-user-agent-rust
```

[View on crates.io](https://crates.io/crates/laravel-user-agent-rust) [View on GitHub](https://github.com/mischasigtermans/laravel-user-agent-rust)

This site uses it to log which robots visit and whether they asked for markdown. The demo above shows what it reads from the request your browser just sent.

What it does
------------

- A handler argument

  Take UserAgent in a handler and ask is\_mobile(), browser(), platform() or robot(). Build one from headers or a string anywhere else.

- Robots by name

  Search engines, AI crawlers and agents, link previews, uptime monitors, headless browsers and HTTP clients, each by its own name.

- Phones and tablets apart

  Model codes from Apple, Samsung, Google, Xiaomi and 19 more makers tell a phone from a tablet. TVs are their own kind.

- More than the user agent

  Client hints, CloudFront viewer headers and the headers proxies put the real user agent in, plus Accept-Language in order of preference.

[View on crates.io](https://crates.io/crates/laravel-user-agent-rust).
