New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

httplease

Package Overview
Dependencies
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

httplease - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

3

lib/core/httpRequest.js

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

timeout: requestConfig.timeout,
url: requestConfig.basePath + requestConfig.path
url: requestConfig.basePath + requestConfig.path,
maxRedirects: 0
};

@@ -42,0 +43,0 @@ }

{
"name": "httplease",
"version": "0.1.1",
"version": "0.1.2",
"description": "HTTP client library with support for pluggable filters, including Zipkin, ASAP, etc",

@@ -16,2 +16,3 @@ "main": "index.js",

"request",
"client",
"promise",

@@ -18,0 +19,0 @@ "caching",

@@ -0,1 +1,3 @@

![build-status](https://pipelines-badges-service.useast.staging.atlassian.io/badge/atlassianlabs/httplease.svg)
# Usage guide

@@ -125,2 +127,2 @@

Copyright (c) 2016 Atlassian and others.
Apache 2.0 licensed, see [LICENSE](LICENSE) file.
Apache 2.0 licensed, see [LICENSE](LICENSE) file.
'use strict';
let {willResolve, expectToReject} = require('jasmine-promise-tools');
let jasminePromiseTools = require('jasmine-promise-tools');
global.willResolve = willResolve;
global.expectToReject = expectToReject;
global.willResolve = jasminePromiseTools.willResolve;
global.expectToReject = jasminePromiseTools.expectToReject;

@@ -95,2 +95,19 @@ 'use strict';

it('does not follow HTTP redirects', willResolve(() => {
httpSpy.getHandler.and.returnValue({
statusCode: 301,
headers: {
'Location': 'http://invalid'
}
});
return httpClient
.withPath('/get')
.withMethodGet()
.send()
.then((result) => {
expect(httpSpy.getHandler).toHaveBeenCalled();
expect(result.status).toBe(301);
});
}));
});

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

expect(options.responseType).toBe('json');
expect(options.maxRedirects).toBe(0);
return q.resolve({});

@@ -80,0 +81,0 @@ });

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