From 982d437c63a0f347a490cc0ed0b3a4af240b7ed7 Mon Sep 17 00:00:00 2001
From: reluc
+ While the {{value()}} function provides built-in validation, we recognize that some
+ use cases may require returning values without validation. In such cases, developers
+ can use alternative patterns, such as directly accessing the underlying data
+ using streams or the {{InteractionOutput/arrayBuffer()}} function (See [[[#validation-arraybuffer-example]]] and [[[#stream-example]]]).
+
+ Warning: Disabling validation may introduce risks, particularly when interacting
+ with remote Things, as mismatches in data formats or schema expectations can lead to
+ unforeseen bugs and vulnerabilities. For more details, see the consumer assertions.
+
Finally, the next two examples shows the usage of a {{ReadableStream}} from an {{InteractionOutput}}.
The InteractionOutput interface
[=Resolve=] |promise| with [[\value]].
+ The arrayBuffer() function
@@ -2472,10 +2483,25 @@ ConsumedThing Examples
// image: ArrayBuffer [0x1 0x2 0x3 0x5 0x15 0x23 ...]
}
+
+
/*{
"video": {
"description" : "the video stream of this camera",
From 7dfafa8934370428ad0ac944a1b7205d7b63e74e Mon Sep 17 00:00:00 2001
From: Cristiano Aguzzi
The InteractionOutput interface
While the {{value()}} function provides built-in validation, we recognize that some
use cases may require returning values without validation. In such cases, developers
can use alternative patterns, such as directly accessing the underlying data
- using streams or the {{InteractionOutput/arrayBuffer()}} function (See [[[#validation-arraybuffer-example]]] and [[[#stream-example]]]).
+ using streams or the {{InteractionOutput/arrayBuffer()}} function (see [[[#validation-arraybuffer-example]]] and [[[#stream-example]]]).
Warning: Disabling validation may introduce risks, particularly when interacting