Skip to content

Narazaka/shiori_transaction.js

Repository files navigation

npm npm license npm download total npm download by month FOSSA Status

Dependency Status devDependency Status Travis Build Status AppVeyor Build Status codecov.io Codacy Badge

SHIORI Protocol transaction

Install

npm:

npm install shiorijk shiori_converter shiori_transaction

This module depends on ShioriJK and shiori_converter.js.

Usage

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());

API

API Document

License

This is released under MIT License.

FOSSA Status

About

SHIORI Protocol transaction

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •