SHIORI Protocol transaction
npm:
npm install shiorijk shiori_converter shiori_transaction
This module depends on ShioriJK and shiori_converter.js.
node.js:
var shiori_transaction = require('shiori_transaction');
var ShioriTransaction = shiori_transaction.ShioriTransaction;
browser:
<script src="shiorijk.js"></script>
<script src="shiori_converter.js"></script>
<script src="shiori_transaction.js"></script>
var request3 = new ShioriJK.Message.Request({
request_line: {
method: 'GET',
version: '3.0',
},
headers: {
ID: 'OnBoot',
Charset: 'UTF-8',
Sender: 'Ikagaka',
},
});
var response2 = new ShioriJK.Message.Response({
status_line: {
code: 200,
version: '2.6',
},
headers: {
Sentence: '\\h\\s[0]\\e',
Charset: 'UTF-8',
Sender: 'ikaga',
},
});
var transaction = new ShioriTransaction();
transaction.request = request3;
console.log(request3.to('2.6').toString());
transaction.response = response2;
console.log(response2.to('3.0').toString());
This is released under MIT License.