Comparing version 3.0.4 to 3.1.0
@@ -10,10 +10,8 @@ let aqt = require('@rqt/aqt'); if (aqt && aqt.__esModule) aqt = aqt.default; | ||
* @param {OutgoingHttpHeaders} [options.headers] Headers to use for the request. | ||
* @param {boolean} [options.compress=true] Add the `Accept-Encoding: gzip, deflate` header automatically to indicate to the server that it can send a compressed response. Default `true`. | ||
* @param {boolean} [options.compress=true] Add the `Accept-Encoding: gzip, deflate` header to indicate to the server that it can send a compressed response. Default `true`. | ||
* @param {string} [options.method="POST"] What HTTP method to use to send data. Default `POST`. | ||
* @param {number} [options.timeout] Timeout after which the request should cancel. | ||
*/ | ||
const rqt = async (address, options = {}) => { | ||
const { data, type, headers, method, compress } = options | ||
const { body } = await aqt(address, { | ||
data, type, headers, method, compress, | ||
}) | ||
const { body } = await aqt(address, options) | ||
/** @type {string} */ | ||
@@ -31,10 +29,8 @@ const r = body | ||
* @param {OutgoingHttpHeaders} [options.headers] Headers to use for the request. | ||
* @param {boolean} [options.compress=true] Add the `Accept-Encoding: gzip, deflate` header automatically to indicate to the server that it can send a compressed response. Default `true`. | ||
* @param {boolean} [options.compress=true] Add the `Accept-Encoding: gzip, deflate` header to indicate to the server that it can send a compressed response. Default `true`. | ||
* @param {string} [options.method="POST"] What HTTP method to use to send data. Default `POST`. | ||
* @param {number} [options.timeout] Timeout after which the request should cancel. | ||
*/ | ||
const jqt = async (address, options = {}) => { | ||
const { data, type, headers, method, compress } = options | ||
const { body } = await aqt(address, { | ||
data, type, headers, method, compress, | ||
}) | ||
const { body } = await aqt(address, options) | ||
/** @type {*} */ | ||
@@ -52,4 +48,5 @@ const r = body | ||
* @param {OutgoingHttpHeaders} [options.headers] Headers to use for the request. | ||
* @param {boolean} [options.compress=true] Add the `Accept-Encoding: gzip, deflate` header automatically to indicate to the server that it can send a compressed response. Default `true`. | ||
* @param {boolean} [options.compress=true] Add the `Accept-Encoding: gzip, deflate` header to indicate to the server that it can send a compressed response. Default `true`. | ||
* @param {string} [options.method="POST"] What HTTP method to use to send data. Default `POST`. | ||
* @param {number} [options.timeout] Timeout after which the request should cancel. | ||
*/ | ||
@@ -74,4 +71,5 @@ const bqt = async (address, options) => { | ||
* @param {OutgoingHttpHeaders} [config.headers] Headers to use for the request. | ||
* @param {boolean} [config.compress=true] Add the `Accept-Encoding: gzip, deflate` header automatically to indicate to the server that it can send a compressed response. Default `true`. | ||
* @param {boolean} [config.compress=true] Add the `Accept-Encoding: gzip, deflate` header to indicate to the server that it can send a compressed response. Default `true`. | ||
* @param {string} [config.method="POST"] What HTTP method to use to send data. Default `POST`. | ||
* @param {number} [config.timeout] Timeout after which the request should cancel. | ||
*/ | ||
@@ -93,4 +91,5 @@ const srqt = async (address, config) => { | ||
* @prop {OutgoingHttpHeaders} [headers] Headers to use for the request. | ||
* @prop {boolean} [compress=true] Add the `Accept-Encoding: gzip, deflate` header automatically to indicate to the server that it can send a compressed response. Default `true`. | ||
* @prop {boolean} [compress=true] Add the `Accept-Encoding: gzip, deflate` header to indicate to the server that it can send a compressed response. Default `true`. | ||
* @prop {string} [method="POST"] What HTTP method to use to send data. Default `POST`. | ||
* @prop {number} [timeout] Timeout after which the request should cancel. | ||
*/ | ||
@@ -97,0 +96,0 @@ |
@@ -30,4 +30,5 @@ let aqt = require('@rqt/aqt'); if (aqt && aqt.__esModule) aqt = aqt.default; | ||
* @param {OutgoingHttpHeaders} [options.headers] Headers to use for the request. | ||
* @param {boolean} [options.compress=true] Add the `Accept-Encoding: gzip, deflate` header automatically to indicate to the server that it can send a compressed response. Default `true`. | ||
* @param {boolean} [options.compress=true] Add the `Accept-Encoding: gzip, deflate` header to indicate to the server that it can send a compressed response. Default `true`. | ||
* @param {string} [options.method="POST"] What HTTP method to use to send data. Default `POST`. | ||
* @param {number} [options.timeout] Timeout after which the request should cancel. | ||
*/ | ||
@@ -47,4 +48,5 @@ async rqt(location, options = {}) { | ||
* @param {OutgoingHttpHeaders} [options.headers] Headers to use for the request. | ||
* @param {boolean} [options.compress=true] Add the `Accept-Encoding: gzip, deflate` header automatically to indicate to the server that it can send a compressed response. Default `true`. | ||
* @param {boolean} [options.compress=true] Add the `Accept-Encoding: gzip, deflate` header to indicate to the server that it can send a compressed response. Default `true`. | ||
* @param {string} [options.method="POST"] What HTTP method to use to send data. Default `POST`. | ||
* @param {number} [options.timeout] Timeout after which the request should cancel. | ||
*/ | ||
@@ -67,4 +69,5 @@ async bqt(location, options = {}) { | ||
* @param {OutgoingHttpHeaders} [options.headers] Headers to use for the request. | ||
* @param {boolean} [options.compress=true] Add the `Accept-Encoding: gzip, deflate` header automatically to indicate to the server that it can send a compressed response. Default `true`. | ||
* @param {boolean} [options.compress=true] Add the `Accept-Encoding: gzip, deflate` header to indicate to the server that it can send a compressed response. Default `true`. | ||
* @param {string} [options.method="POST"] What HTTP method to use to send data. Default `POST`. | ||
* @param {number} [options.timeout] Timeout after which the request should cancel. | ||
*/ | ||
@@ -90,4 +93,5 @@ async jqt(location, options = {}) { | ||
* @param {OutgoingHttpHeaders} [options.headers] Headers to use for the request. | ||
* @param {boolean} [options.compress=true] Add the `Accept-Encoding: gzip, deflate` header automatically to indicate to the server that it can send a compressed response. Default `true`. | ||
* @param {string} [options.headers="POST"] What HTTP method to use to send data. Default `POST`. | ||
* @param {boolean} [options.compress=true] Add the `Accept-Encoding: gzip, deflate` header to indicate to the server that it can send a compressed response. Default `true`. | ||
* @param {number} [options.timeout] The timeout after which the request should fail. | ||
* @param {string} [options.method="POST"] What HTTP method to use to send data. Default `POST`. | ||
* @param {boolean} [options.binary=false] Whether to return a buffer instead of a string. Default `false`. | ||
@@ -184,4 +188,5 @@ * @param {boolean} [options.justHeaders=false] Whether to stop the request after response headers were received, without waiting for the data. Default `false`. | ||
* @prop {OutgoingHttpHeaders} [headers] Headers to use for the request. | ||
* @prop {boolean} [compress=true] Add the `Accept-Encoding: gzip, deflate` header automatically to indicate to the server that it can send a compressed response. Default `true`. | ||
* @prop {boolean} [compress=true] Add the `Accept-Encoding: gzip, deflate` header to indicate to the server that it can send a compressed response. Default `true`. | ||
* @prop {string} [method="POST"] What HTTP method to use to send data. Default `POST`. | ||
* @prop {number} [timeout] Timeout after which the request should cancel. | ||
*/ | ||
@@ -204,4 +209,5 @@ | ||
* @prop {OutgoingHttpHeaders} [headers] Headers to use for the request. | ||
* @prop {boolean} [compress=true] Add the `Accept-Encoding: gzip, deflate` header automatically to indicate to the server that it can send a compressed response. Default `true`. | ||
* @prop {string} [headers="POST"] What HTTP method to use to send data. Default `POST`. | ||
* @prop {boolean} [compress=true] Add the `Accept-Encoding: gzip, deflate` header to indicate to the server that it can send a compressed response. Default `true`. | ||
* @prop {number} [timeout] The timeout after which the request should fail. | ||
* @prop {string} [method="POST"] What HTTP method to use to send data. Default `POST`. | ||
* @prop {boolean} [binary=false] Whether to return a buffer instead of a string. Default `false`. | ||
@@ -208,0 +214,0 @@ * @prop {boolean} [justHeaders=false] Whether to stop the request after response headers were received, without waiting for the data. Default `false`. |
@@ -0,1 +1,8 @@ | ||
## 2 February 2019 | ||
### 3.1.0 | ||
- [feature] Add the timeout functionality. | ||
- [package] Add [https://www.technation.sucks](Tech Nation Visa Sucks) footer. | ||
## 25 January 2019 | ||
@@ -2,0 +9,0 @@ |
{ | ||
"name": "rqt", | ||
"version": "3.0.4", | ||
"description": "Easy-To-Use Request Library That Supports String, JSON And Buffer Requests, GZip Compression And Session Maintenance.", | ||
"version": "3.1.0", | ||
"description": "Easy-To-Use Request Library That Supports String, JSON And Buffer Requests, Timeouts, GZip Compression And Session Maintenance.", | ||
"main": "build", | ||
@@ -48,6 +48,6 @@ "module": "src/index.js", | ||
"devDependencies": { | ||
"@idio/core": "1.0.2", | ||
"@wrote/read": "1.0.0", | ||
"alamode": "1.6.1", | ||
"documentary": "1.20.1", | ||
"@idio/core": "1.2.0", | ||
"@wrote/read": "1.0.2", | ||
"alamode": "1.7.3", | ||
"documentary": "1.21.1", | ||
"eslint-config-artdeco": "1.0.1", | ||
@@ -59,4 +59,4 @@ "https-context": "1.0.3", | ||
"dependencies": { | ||
"@rqt/aqt": "1.1.5" | ||
"@rqt/aqt": "1.2.1" | ||
} | ||
} |
@@ -57,9 +57,10 @@ # rqt | ||
| Name | Type | Description | Default | | ||
| -------- | -------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | -------- | | ||
| data | _*_ | Optional data to send to the server with the request. | - | | ||
| type | _'form'\|'json'_ | How to send data: `json` to serialise JSON data and `form` for url-encoded transmission with `json` mode by default. | `'json'` | | ||
| headers | _[OutgoingHttpHeaders](#type-outgoinghttpheaders)_ | Headers to use for the request. | - | | ||
| compress | _boolean_ | Add the `Accept-Encoding: gzip, deflate` header automatically to indicate to the server that it can send a compressed response. | `true` | | ||
| method | _string_ | What HTTP method to use to send data. | `POST` | | ||
| Name | Type | Description | Default | | ||
| -------- | -------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------- | | ||
| data | _*_ | Optional data to send to the server with the request. | - | | ||
| type | _'form'\|'json'_ | How to send data: `json` to serialise JSON data and `form` for url-encoded transmission with `json` mode by default. | `'json'` | | ||
| headers | _[OutgoingHttpHeaders](#type-outgoinghttpheaders)_ | Headers to use for the request. | - | | ||
| compress | _boolean_ | Add the `Accept-Encoding: gzip, deflate` header to indicate to the server that it can send a compressed response. | `true` | | ||
| method | _string_ | What HTTP method to use to send data. | `POST` | | ||
| timeout | _number_ | Timeout after which the request should cancel. | - | | ||
@@ -216,11 +217,12 @@ <p align="center"><a href="#table-of-contents"><img src=".documentary/section-breaks/2.svg?sanitize=true"></a></p> | ||
| Name | Type | Description | Default | | ||
| ----------- | -------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | -------- | | ||
| __data*__ | _Object_ | Optional data to send to the server with the request. | - | | ||
| type | _'form'\|'json'_ | How to send data: `json` to serialise JSON data and `form` for url-encoded transmission with `json` mode by default. | `'json'` | | ||
| headers | _[OutgoingHttpHeaders](#type-outgoinghttpheaders)_ | Headers to use for the request. | - | | ||
| compress | _boolean_ | Add the `Accept-Encoding: gzip, deflate` header automatically to indicate to the server that it can send a compressed response. | `true` | | ||
| method | _string_ | What HTTP method to use to send data. | `POST` | | ||
| binary | _boolean_ | Whether to return a buffer instead of a string. | `false` | | ||
| justHeaders | _boolean_ | Whether to stop the request after response headers were received, without waiting for the data. | `false` | | ||
| Name | Type | Description | Default | | ||
| ----------- | -------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------- | | ||
| __data*__ | _Object_ | Optional data to send to the server with the request. | - | | ||
| type | _'form'\|'json'_ | How to send data: `json` to serialise JSON data and `form` for url-encoded transmission with `json` mode by default. | `'json'` | | ||
| headers | _[OutgoingHttpHeaders](#type-outgoinghttpheaders)_ | Headers to use for the request. | - | | ||
| compress | _boolean_ | Add the `Accept-Encoding: gzip, deflate` header to indicate to the server that it can send a compressed response. | `true` | | ||
| timeout | _number_ | The timeout after which the request should fail. | - | | ||
| method | _string_ | What HTTP method to use to send data. | `POST` | | ||
| binary | _boolean_ | Whether to return a buffer instead of a string. | `false` | | ||
| justHeaders | _boolean_ | Whether to stop the request after response headers were received, without waiting for the data. | `false` | | ||
@@ -373,4 +375,24 @@ `import('http').IncomingHttpHeaders` __<a name="type-incominghttpheaders">`IncomingHttpHeaders`</a>__ | ||
(c) [Rqt](https://rqt.biz) 2019 | ||
<table> | ||
<tr> | ||
<th> | ||
<a href="https://artd.eco"> | ||
<img src="https://raw.githubusercontent.com/wrote/wrote/master/images/artdeco.png" alt="Art Deco" /> | ||
</a> | ||
</th> | ||
<th> | ||
© <a href="https://artd.eco">Art Deco</a> for <a href="https://rqt.biz">Rqt</a> | ||
2019 | ||
</th> | ||
<th> | ||
<a href="https://www.technation.sucks" title="Tech Nation Visa"> | ||
<img src="https://raw.githubusercontent.com/artdecoweb/www.technation.sucks/master/anim.gif" alt="Tech Nation Visa" /> | ||
</a> | ||
</th> | ||
<th> | ||
<a href="https://www.technation.sucks">Tech Nation Visa Sucks</a> | ||
</th> | ||
</tr> | ||
</table> | ||
<p align="center"><a href="#table-of-contents"><img src=".documentary/section-breaks/-1.svg?sanitize=true"></a></p> |
@@ -10,10 +10,8 @@ import aqt from '@rqt/aqt' | ||
* @param {OutgoingHttpHeaders} [options.headers] Headers to use for the request. | ||
* @param {boolean} [options.compress=true] Add the `Accept-Encoding: gzip, deflate` header automatically to indicate to the server that it can send a compressed response. Default `true`. | ||
* @param {boolean} [options.compress=true] Add the `Accept-Encoding: gzip, deflate` header to indicate to the server that it can send a compressed response. Default `true`. | ||
* @param {string} [options.method="POST"] What HTTP method to use to send data. Default `POST`. | ||
* @param {number} [options.timeout] Timeout after which the request should cancel. | ||
*/ | ||
export const rqt = async (address, options = {}) => { | ||
const { data, type, headers, method, compress } = options | ||
const { body } = await aqt(address, { | ||
data, type, headers, method, compress, | ||
}) | ||
const { body } = await aqt(address, options) | ||
/** @type {string} */ | ||
@@ -31,10 +29,8 @@ const r = body | ||
* @param {OutgoingHttpHeaders} [options.headers] Headers to use for the request. | ||
* @param {boolean} [options.compress=true] Add the `Accept-Encoding: gzip, deflate` header automatically to indicate to the server that it can send a compressed response. Default `true`. | ||
* @param {boolean} [options.compress=true] Add the `Accept-Encoding: gzip, deflate` header to indicate to the server that it can send a compressed response. Default `true`. | ||
* @param {string} [options.method="POST"] What HTTP method to use to send data. Default `POST`. | ||
* @param {number} [options.timeout] Timeout after which the request should cancel. | ||
*/ | ||
export const jqt = async (address, options = {}) => { | ||
const { data, type, headers, method, compress } = options | ||
const { body } = await aqt(address, { | ||
data, type, headers, method, compress, | ||
}) | ||
const { body } = await aqt(address, options) | ||
/** @type {*} */ | ||
@@ -52,4 +48,5 @@ const r = body | ||
* @param {OutgoingHttpHeaders} [options.headers] Headers to use for the request. | ||
* @param {boolean} [options.compress=true] Add the `Accept-Encoding: gzip, deflate` header automatically to indicate to the server that it can send a compressed response. Default `true`. | ||
* @param {boolean} [options.compress=true] Add the `Accept-Encoding: gzip, deflate` header to indicate to the server that it can send a compressed response. Default `true`. | ||
* @param {string} [options.method="POST"] What HTTP method to use to send data. Default `POST`. | ||
* @param {number} [options.timeout] Timeout after which the request should cancel. | ||
*/ | ||
@@ -74,4 +71,5 @@ export const bqt = async (address, options) => { | ||
* @param {OutgoingHttpHeaders} [config.headers] Headers to use for the request. | ||
* @param {boolean} [config.compress=true] Add the `Accept-Encoding: gzip, deflate` header automatically to indicate to the server that it can send a compressed response. Default `true`. | ||
* @param {boolean} [config.compress=true] Add the `Accept-Encoding: gzip, deflate` header to indicate to the server that it can send a compressed response. Default `true`. | ||
* @param {string} [config.method="POST"] What HTTP method to use to send data. Default `POST`. | ||
* @param {number} [config.timeout] Timeout after which the request should cancel. | ||
*/ | ||
@@ -93,4 +91,5 @@ export const srqt = async (address, config) => { | ||
* @prop {OutgoingHttpHeaders} [headers] Headers to use for the request. | ||
* @prop {boolean} [compress=true] Add the `Accept-Encoding: gzip, deflate` header automatically to indicate to the server that it can send a compressed response. Default `true`. | ||
* @prop {boolean} [compress=true] Add the `Accept-Encoding: gzip, deflate` header to indicate to the server that it can send a compressed response. Default `true`. | ||
* @prop {string} [method="POST"] What HTTP method to use to send data. Default `POST`. | ||
* @prop {number} [timeout] Timeout after which the request should cancel. | ||
*/ |
@@ -30,4 +30,5 @@ import aqt from '@rqt/aqt' | ||
* @param {OutgoingHttpHeaders} [options.headers] Headers to use for the request. | ||
* @param {boolean} [options.compress=true] Add the `Accept-Encoding: gzip, deflate` header automatically to indicate to the server that it can send a compressed response. Default `true`. | ||
* @param {boolean} [options.compress=true] Add the `Accept-Encoding: gzip, deflate` header to indicate to the server that it can send a compressed response. Default `true`. | ||
* @param {string} [options.method="POST"] What HTTP method to use to send data. Default `POST`. | ||
* @param {number} [options.timeout] Timeout after which the request should cancel. | ||
*/ | ||
@@ -47,4 +48,5 @@ async rqt(location, options = {}) { | ||
* @param {OutgoingHttpHeaders} [options.headers] Headers to use for the request. | ||
* @param {boolean} [options.compress=true] Add the `Accept-Encoding: gzip, deflate` header automatically to indicate to the server that it can send a compressed response. Default `true`. | ||
* @param {boolean} [options.compress=true] Add the `Accept-Encoding: gzip, deflate` header to indicate to the server that it can send a compressed response. Default `true`. | ||
* @param {string} [options.method="POST"] What HTTP method to use to send data. Default `POST`. | ||
* @param {number} [options.timeout] Timeout after which the request should cancel. | ||
*/ | ||
@@ -67,4 +69,5 @@ async bqt(location, options = {}) { | ||
* @param {OutgoingHttpHeaders} [options.headers] Headers to use for the request. | ||
* @param {boolean} [options.compress=true] Add the `Accept-Encoding: gzip, deflate` header automatically to indicate to the server that it can send a compressed response. Default `true`. | ||
* @param {boolean} [options.compress=true] Add the `Accept-Encoding: gzip, deflate` header to indicate to the server that it can send a compressed response. Default `true`. | ||
* @param {string} [options.method="POST"] What HTTP method to use to send data. Default `POST`. | ||
* @param {number} [options.timeout] Timeout after which the request should cancel. | ||
*/ | ||
@@ -90,4 +93,5 @@ async jqt(location, options = {}) { | ||
* @param {OutgoingHttpHeaders} [options.headers] Headers to use for the request. | ||
* @param {boolean} [options.compress=true] Add the `Accept-Encoding: gzip, deflate` header automatically to indicate to the server that it can send a compressed response. Default `true`. | ||
* @param {string} [options.headers="POST"] What HTTP method to use to send data. Default `POST`. | ||
* @param {boolean} [options.compress=true] Add the `Accept-Encoding: gzip, deflate` header to indicate to the server that it can send a compressed response. Default `true`. | ||
* @param {number} [options.timeout] The timeout after which the request should fail. | ||
* @param {string} [options.method="POST"] What HTTP method to use to send data. Default `POST`. | ||
* @param {boolean} [options.binary=false] Whether to return a buffer instead of a string. Default `false`. | ||
@@ -184,4 +188,5 @@ * @param {boolean} [options.justHeaders=false] Whether to stop the request after response headers were received, without waiting for the data. Default `false`. | ||
* @prop {OutgoingHttpHeaders} [headers] Headers to use for the request. | ||
* @prop {boolean} [compress=true] Add the `Accept-Encoding: gzip, deflate` header automatically to indicate to the server that it can send a compressed response. Default `true`. | ||
* @prop {boolean} [compress=true] Add the `Accept-Encoding: gzip, deflate` header to indicate to the server that it can send a compressed response. Default `true`. | ||
* @prop {string} [method="POST"] What HTTP method to use to send data. Default `POST`. | ||
* @prop {number} [timeout] Timeout after which the request should cancel. | ||
*/ | ||
@@ -204,6 +209,7 @@ | ||
* @prop {OutgoingHttpHeaders} [headers] Headers to use for the request. | ||
* @prop {boolean} [compress=true] Add the `Accept-Encoding: gzip, deflate` header automatically to indicate to the server that it can send a compressed response. Default `true`. | ||
* @prop {string} [headers="POST"] What HTTP method to use to send data. Default `POST`. | ||
* @prop {boolean} [compress=true] Add the `Accept-Encoding: gzip, deflate` header to indicate to the server that it can send a compressed response. Default `true`. | ||
* @prop {number} [timeout] The timeout after which the request should fail. | ||
* @prop {string} [method="POST"] What HTTP method to use to send data. Default `POST`. | ||
* @prop {boolean} [binary=false] Whether to return a buffer instead of a string. Default `false`. | ||
* @prop {boolean} [justHeaders=false] Whether to stop the request after response headers were received, without waiting for the data. Default `false`. | ||
*/ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
50873
582
395
+ Added@artdeco/clean-stack@1.0.1(transitive)
+ Added@rqt/aqt@1.2.1(transitive)
+ Addedcatchment@3.2.2(transitive)
+ Addederotic@2.0.2(transitive)
- Removed@artdeco/clean-stack@1.0.0(transitive)
- Removed@rqt/aqt@1.1.5(transitive)
- Removedcatchment@3.2.0(transitive)
- Removederotic@2.0.1(transitive)
Updated@rqt/aqt@1.2.1