File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change 1+ // Copyright 2024 Contributors to the Eclipse Foundation. All rights reserved.
2+ // Use of this source code is governed by a BSD-style
3+ // license that can be found in the LICENSE file.
4+ //
5+ // SPDX-License-Identifier: BSD-3-Clause
6+
7+ // ignore_for_file: avoid_print
8+
9+ import "package:dart_wot/binding_http.dart" ;
10+ import "package:dart_wot/core.dart" ;
11+
12+ Future <void > main (List <String > args) async {
13+ final servient = Servient (
14+ clientFactories: [
15+ HttpClientFactory (),
16+ ],
17+ );
18+
19+ final wot = await servient.start ();
20+ // FIXME(JRKhb): The "things" property currently points to "localhost",
21+ // preventing this example from working
22+ final url = Uri .parse ("https://zion.vaimee.com/.well-known/wot" );
23+
24+ final thingDiscovery = await wot.exploreDirectory (url);
25+
26+ await for (final thingDescription in thingDiscovery) {
27+ print (thingDescription);
28+ }
29+ }
You can’t perform that action at this time.
0 commit comments