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

ask

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ask - npm Package Compare versions

Comparing version 1.2.0 to 1.3.0

15

index.js

@@ -81,5 +81,14 @@ var asArray = require('as-array');

var mock = self.mock(method, uri);
return mock
? mock.fn()()
: rawHttp(extend(resourceObject, resource.xhrOptions || {}));
if (mock) {
mock.request = {
body: params,
method: method,
pathname: slash(uri),
headers: resource.headers
};
return mock.fn()();
}
else {
return rawHttp(extend(resourceObject, resource.xhrOptions || {}));
}
};

@@ -86,0 +95,0 @@

2

package.json
{
"name": "ask",
"version": "1.2.0",
"version": "1.3.0",
"description": "A simple, chainable way to construct HTTP requests in Node or the browser",

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

@@ -43,2 +43,15 @@ var expect = require('chai').expect;

it('provides the request body in the response', function () {
var tester = request.post('test');
request.when('POST', '/test')
.respond('testing');
return tester({body: 'body'}).then(function (res) {
expect(res.request.body).to.eql({body: 'body'});
});
});
it('sets a custom status code', function () {

@@ -45,0 +58,0 @@ request

Sorry, the diff of this file is too big to display

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