You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the moment, Radon scripts are only capable of processing stringified responses from HTTP-GET and HTTP-POST retrievals. This proposal specifies the support of binary buffers as returned from HTTP-GET or HTTP-POST retrievals.
Motivation and rationale
Supporting binary sources enables Data Requests to process the whole binary content, or just parts of it, of any public resource or digital asset published on the Internet. An example of a possible application would be leveraging the witnessing capability of the Witnet blockchain to certify not only the existence of some public digital asset at certain moment of time, but also capture a cryptographic proof (e.g. SHA-256 hash) of its actual content.
Specification
Upon execution of a HTTP-GET or HTTP-POST retrieval, the first operator of the corresponding Radon script needs to be peeked in order to determine whether to deserialize the response from the HTTP source as a string or as a buffer stream. As for the scope of this proposal, both RadonString and RadonBytes operators would be acceptable as first element in Radon scripts. If a Radon operator of any other kind is found as first element in the retrieval's Radon script, a RadError::InvalidScript should be triggered before even attempting the corresponding HTTP-GET or HTTP-POST request.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Abstract
At the moment, Radon scripts are only capable of processing stringified responses from HTTP-GET and HTTP-POST retrievals. This proposal specifies the support of binary buffers as returned from HTTP-GET or HTTP-POST retrievals.
Motivation and rationale
Supporting binary sources enables Data Requests to process the whole binary content, or just parts of it, of any public resource or digital asset published on the Internet. An example of a possible application would be leveraging the witnessing capability of the Witnet blockchain to certify not only the existence of some public digital asset at certain moment of time, but also capture a cryptographic proof (e.g. SHA-256 hash) of its actual content.
Specification
Upon execution of a HTTP-GET or HTTP-POST retrieval, the first operator of the corresponding Radon script needs to be peeked in order to determine whether to deserialize the response from the HTTP source as a string or as a buffer stream. As for the scope of this proposal, both RadonString and RadonBytes operators would be acceptable as first element in Radon scripts. If a Radon operator of any other kind is found as first element in the retrieval's Radon script, a
RadError::InvalidScript
should be triggered before even attempting the corresponding HTTP-GET or HTTP-POST request.Reference implementation
#2406
Beta Was this translation helpful? Give feedback.
All reactions