From fdab57f966a3928852701a2e41d75499f8f828ac Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Thu, 4 Sep 2025 20:13:20 +0100 Subject: Add function to grab UA details from useragentstring.com --- src/uaLookup.hpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/uaLookup.hpp (limited to 'src/uaLookup.hpp') diff --git a/src/uaLookup.hpp b/src/uaLookup.hpp new file mode 100644 index 0000000..5492f05 --- /dev/null +++ b/src/uaLookup.hpp @@ -0,0 +1,16 @@ +#pragma once + +#include +#include +#include + +namespace WebStat { + class CurlError : public std::runtime_error { + public: + explicit CurlError(CURLcode code, const char * msg) : std::runtime_error {msg}, code(code) { } + + CURLcode code; + }; + + std::string getUserAgentDetail(std::string_view uas, const char * baseUrl = "https://useragentstring.com"); +} -- cgit v1.2.3