Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@bbc/http-transport

Package Overview
Dependencies
Maintainers
6
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bbc/http-transport - npm Package Compare versions

Comparing version 0.0.9 to 0.0.10

45

lib/client.js

@@ -23,4 +23,3 @@ 'use strict';

*
* @method
* useGlobal
* @method useGlobal
* @param {function} fn - a global plugin

@@ -44,4 +43,3 @@ * @return a HttpTransport instance

*
* @method
* use
* @method use
* @return a HttpTransport instance

@@ -65,4 +63,3 @@ * @param {function} fn - per request plugin

*
* @method
* get
* @method get
* @param {string} url

@@ -87,4 +84,3 @@ * @return a HttpTransport instance

*
* @method
* post
* @method post
* @param {string} url

@@ -111,4 +107,3 @@ * @param {object} request body

*
* @method
* put
* @method put
* @param {string} url

@@ -135,4 +130,3 @@ * @param {object} request body

*
* @method
* delete
* @method delete
* @param {string} url

@@ -158,4 +152,3 @@ * @param {object} request body

*
* @method
* patch
* @method patch
* @param {string} url

@@ -182,4 +175,3 @@ * @param {object} request body

*
* @method
* head
* @method head
* @param {string} url

@@ -204,4 +196,3 @@ * @return a HttpTransport instance

*
* @method
* headers
* @method headers
* @param {string|object} name - header name or headers object

@@ -230,4 +221,3 @@ * @param {string|object} value - header value

*
* @method
* query
* @method query
* @param {string|object} name - query name or query object

@@ -256,4 +246,3 @@ * @param {string|object} value - query value

*
* @method
* timeout
* @method timeout
* @param {integer} timeout - timeout in seconds

@@ -276,4 +265,3 @@ * @return a HttpTransport instance

*
* @method
* retry
* @method retry
* @param {integer} timeout - number of times to retry a failed request

@@ -296,4 +284,3 @@ * @return a HttpTransport instance

*
* @method
* retryDelay
* @method retryDelay
* @param {integer} timeout - number of ms to wait between retries (default: 100)

@@ -317,4 +304,3 @@ * @return a HttpTransport instance

*
* @method
* asBody
* @method asBody
* @return a Promise. If the Promise fulfils,

@@ -338,4 +324,3 @@ * the fulfilment value is the response body, as a string by default.

*
* @method
* asResponse
* @method asResponse
* @return a Promise. If the Promise fulfils,

@@ -342,0 +327,0 @@ * the fulfilment value is response object.

@@ -16,2 +16,6 @@ 'use strict';

addQuery(k, v) {
if (arguments.length === 0 || v === undefined) {
return this;
}
this._queries[k] = v;

@@ -22,2 +26,6 @@ return this;

addHeader(k, v) {
if (arguments.length === 0 || v === undefined) {
return this;
}
this._headers[k] = v;

@@ -24,0 +32,0 @@ return this;

@@ -55,2 +55,3 @@ 'use strict';

const method = ctx.req.getMethod();
return this._request[toAsyncMethod(method)](url, opts);

@@ -57,0 +58,0 @@ }

{
"name": "@bbc/http-transport",
"version": "0.0.9",
"version": "0.0.10",
"description": "A flexible, modular REST client built for ease-of-use and resilience.",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc