3 ms·
What happens if two communicating programs can 'speak' multiple formats--how do they choose one to use? Could we leverage http content negotiation?
by karmakaze 6y ago
What happens if two communicating programs can 'speak' multiple formats--how do they choose one to use?
Could we leverage http content negotiation?
- hnlmorg 6y agoMuch like any programming language that supports generics: a function will operate upon a variable based on the data type of that variable. With murex, data types are passed down the pipeline (albeit out of band). The data can be recast, reformatted, etc but by default processes that support multiple formats honour the data type received in STDOUT and thus output in the same format. The Content-Type HTTP head is used to determine data type when the pipeline originates from the web. So there is some awareness there. Likewise file extensions are used if content originates from a file system.