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

heroku-client

Package Overview
Dependencies
Maintainers
1
Versions
72
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

heroku-client - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

12

lib/request.js

@@ -164,8 +164,10 @@ var http = require('http'),

Request.prototype.writeBody = function writeBody (req) {
if (!this.options.body) return;
if (this.options.body) {
var body = JSON.stringify(this.options.body);
var body = JSON.stringify(this.options.body);
req.setHeader('Content-length', body.length);
req.write(body);
req.setHeader('Content-length', body.length);
req.write(body);
} else {
req.setHeader('Content-length', 0);
}
}

@@ -172,0 +174,0 @@

{
"name": "heroku-client",
"version": "1.1.0",
"version": "1.1.1",
"description": "A wrapper for the Heroku v3 API",

@@ -21,2 +21,4 @@ "main": "./lib/heroku.js",

"name": "Ray McDermott"
}, {
"name": "Bob Zoller"
}],

@@ -23,0 +25,0 @@ "license": "MIT",

@@ -126,2 +126,6 @@ # heroku-client [![Build Status](https://travis-ci.org/jclem/node-heroku-client.png?branch=master)](https://travis-ci.org/jclem/node-heroku-client)

### HTTP Proxies
If you'd like to make requests through an HTTP proxy, set the `HEROKU_HTTP_PROXY_HOST` environment variable with your proxy host, and `HEROKU_HTTP_PROXY_PORT` with the desired port (defaults to 8080). heroku-client will then make requests through this proxy instead of directly to api.heroku.com.
## Caching

@@ -128,0 +132,0 @@

@@ -50,2 +50,11 @@ var http = require('http'),

it('sets the Content-length to 0 when a body is not present', function(done) {
spyOn(MockRequest.prototype, 'setHeader');
makeRequest('/apps/example/collaborators/bob%40example.com', { method: 'DELETE' }, function() {
expect(MockRequest.prototype.setHeader).toHaveBeenCalledWith('Content-length', 0);
done();
});
});
describe('when using an HTTP proxy', function() {

@@ -52,0 +61,0 @@ beforeEach(function() {

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