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

flashheart

Package Overview
Dependencies
Maintainers
4
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

flashheart - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

3

lib/client.js

@@ -11,3 +11,4 @@ var _ = require('lodash');

gzip: true,
time: true
time: true,
forever: true
});

@@ -14,0 +15,0 @@

{
"name": "flashheart",
"version": "1.0.1",
"version": "1.0.2",
"description": "A fully-featured REST client built for ease-of-use and resilience",

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

@@ -65,2 +65,4 @@ # flashheart

```js
var Catbox = require('catbox').Client;
var Memory = require('catbox-memory');
var storage = new Catbox(new Memory());

@@ -75,3 +77,3 @@ var client = require('flashheart').createClient({

```js
var client = require('@ibl/flashheart').createClient({
var client = require('flashheart').createClient({
cache: storage,

@@ -154,3 +156,3 @@ doNotVary: ['Request-Id']

```js
var customRequest = require('request').defaults({
var request = require('request').defaults({
json: false,

@@ -163,6 +165,23 @@ headers: {

var client = require('flashheart').createClient({
request: customRequest
request: request
});
```
#### Usage with client certificates
The `request` option can also be used to pass a pre-configured request client for HTTPS client certificate authentication:
```js
var fs = require('fs');
var request = require('request').defaults({
pfx: fs.readFileSync('/path/to/my/cert.p12'),
passphrase: 'password',
strictSSL: false
});
var client = require('flashheart').createClient({
request: request
});
```
## API

@@ -169,0 +188,0 @@

@@ -205,3 +205,3 @@ var nock = require('nock');

server.listen(0);
var url = util.format('http://%s:%d', server.address().address, server.address().port);
var url = util.format('http://127.0.0.1:%d', server.address().port);
nock.enableNetConnect(url.replace('http://', ''));

@@ -208,0 +208,0 @@

Sorry, the diff of this file is not supported yet

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