2.0.2 • Published 6 years ago
hostmeta v2.0.2
getHostMeta - Fetch and parse .well-known/host-meta
What is this?
A browser module for looking up metadata about a host, using the /.well-known/host-meta[.json]
files, which is useful for discovering associated services for a host, such as an OpenID endpoint or where to connect for an XMPP BOSH/WebSocket session.
Installing
$ npm install hostmeta
Building bundled/minified version (for AMD, etc)
$ make build
The bundled and minified files will be in the generated build
directory.
How to use it
var getHostMeta = require('hostmeta');
getHostMeta('example.com', function (err, data) {
if (err) {
console.log("Couldn't retrieve host-meta data");
}
console.log(data);
// Where data might look like:
// {
// "links": [
// {
// "rel": "urn:xmpp:alt-connections:websocket",
// "href': "wss://example.com:5281/xmpp-websocket"
// },
// {
// "rel": "author",
// "href': "http://example.com/joe"
// }
// ]
// }
});
License
MIT
Created By
If you like this, follow: @lancestout on twitter.
2.0.2
6 years ago
2.0.1
8 years ago
2.0.0
9 years ago
1.2.1
10 years ago
1.2.0
10 years ago
1.1.0
10 years ago
1.0.1
10 years ago
1.0.0
10 years ago
0.3.5
10 years ago
0.3.4
10 years ago
0.3.3
10 years ago
0.3.2
10 years ago
0.3.1
10 years ago
0.3.0
10 years ago
0.2.2
10 years ago
0.2.1
10 years ago
0.2.0
10 years ago
0.1.1
11 years ago
0.1.0
11 years ago