diff options
author | Valentin Popov <info@valentineus.link> | 2017-11-08 04:28:32 +0300 |
---|---|---|
committer | Valentin Popov <info@valentineus.link> | 2017-11-08 04:28:32 +0300 |
commit | e663da508173936114bca09289403b0ee37bf5e4 (patch) | |
tree | a212372cf37a717236048ba97e1753ba9d2a5138 /src | |
parent | 178c6cbcb7d70a7b70f595d519078cce0803e174 (diff) | |
download | iii-client-e663da508173936114bca09289403b0ee37bf5e4.tar.xz iii-client-e663da508173936114bca09289403b0ee37bf5e4.zip |
Release of the version 3.2.2
Diffstat (limited to 'src')
-rw-r--r-- | src/index.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/index.js b/src/index.js index ea2e14a..4120ce2 100644 --- a/src/index.js +++ b/src/index.js @@ -7,7 +7,7 @@ import http from 'http'; */ function connect(uuid, callback) { if (!isVerification(uuid)) { - throw new Error('The variable \'uuid\' is not valid.'); + throw new TypeError('The variable \'uuid\' is not valid.'); } var pkg = createPackage(uuid, null); @@ -22,7 +22,7 @@ function connect(uuid, callback) { */ function send(uuid, text, callback) { if (!isVerification(uuid)) { - throw new Error('The variable \'uuid\' is not valid.'); + throw new TypeError('The variable \'uuid\' is not valid.'); } if (!isString(text)) { @@ -43,8 +43,8 @@ function forward(pkg, path, callback) { var query = { path: `/api/2.0/json/Chat.${path}`, hostname: 'iii.ru', - method: 'POST', - port: 80 + protocol: 'http:', + method: 'POST' }; var request = http.request(query, (response) => { |