From e663da508173936114bca09289403b0ee37bf5e4 Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Wed, 8 Nov 2017 05:28:32 +0400 Subject: Release of the version 3.2.2 --- src/index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') 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) => { -- cgit v1.2.3