ndt7-js
ndt7-js copied to clipboard
client should support client supplied metadata
The current JS client M-Lab provides supports the addition of metadata about the client.
The ndt7-js reference client should also support this.
The mechanism I'm thinking of supporting is the following:
- clients provide extra http parameters to the locate API request.
- the locate api copies "safe"/"predefined" parameters from that request to the websocket URLs generated for access to the measurement service
For example:
https://locate.measurementlab.net/v2/nearest/ndt/ndt7?client_name=foo&client_version=0.1.1
Generates URLs like:
wss://ndt-mlab1-foo01.mlab-oti.measurement-lab.org/ndt/v7/download?client_name=foo&client_version=0.11&access_token=...
This would preserve the current behavior where clients only use the urls provided by the locate api without needing to manipulate them.
The method described above is now in production, and in use by at least two clients. Please use this method for the Javascript client also.
At a minimum the ndt7-js client should provide a client_name=
parameter to the locate request identifying that this is the ndt7-js client. The ndt7-client-ios and ndt7-client-android clients already do this. Ideally, the ndt7-js client would also provide client_version=
. These variables would be propagated to the ndt client metadata.