New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@gometric/statsd-http-proxy-client

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@gometric/statsd-http-proxy-client

JavaScript client for [statsd-http-proxy](https://github.com/GoMetric/statsd-http-proxy) for using in browsers.

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

StatsD HTTP Proxy Client

JavaScript client for statsd-http-proxy for using in browsers.

Installation

Through npm

npm i @gometric/statsd-http-proxy-client

Basic usage

Library uses fetch so to support old browsers you need fetch polyfill.

UMD loader

<!--- fetch polyfill --->
<script src="fetch.umd.js"></script>
<!--- proxy --->
<script src="StatsDHttpProxy.js"></script>

<script type="text/javascript">
    (function() {
        var token = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiIiLCJpYXQiOjE1MTk0MjE1NDIsImV4cCI6MTg2NjU3Njc0MiwiYXVkIjoiIiwic3ViIjoiIiwiR3JlZXRpbmciOiJIZWxsbywgZGVzY2VuZGFudHMifQ.n2qI2Ar9KzL3IsmlHjZAQmrf_Iz2ugnplwNIl4ELlDk';
        var statsdHttpProxyHost = 'http://localhost:8080';
        
        var client = new StatsDHttpProxy.Client(statsdHttpProxyHost, token);
        client.count('some.key', 42);
        client.timing('some.key', 4200);
    })();
</script>

Keywords

statsd

FAQs

Package last updated on 22 Jan 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts