diff --git a/README.md b/README.md index f5f85c73..2537f107 100644 --- a/README.md +++ b/README.md @@ -46,8 +46,10 @@ To do so, a Thing Description JSON string is first parsed and turned into a import 'package:dart_wot/dart_wot.dart'; Future main(List args) async { - final CoapClientFactory coapClientFactory = CoapClientFactory(null); - final servient = Servient()..addClientFactory(coapClientFactory); + final CoapClientFactory coapClientFactory = CoapClientFactory(); + final servient = Servient( + protocolClients: [coapClientFactory] + ); final wot = await servient.start(); final thingDescriptionJson = '''