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

superagent

Package Overview
Dependencies
Maintainers
1
Versions
174
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

superagent - npm Package Compare versions

Comparing version 0.6.0 to 0.7.0

5

History.md
0.7.0 / 2012-08-03
==================
* allow `query()` to be called after the internal `req` has been created [tootallnate]
0.6.0 / 2012-07-17

@@ -3,0 +8,0 @@ ==================

24

lib/node/index.js

@@ -261,6 +261,6 @@

Request.prototype.query = function(obj){
this._query = this._query || {};
for (var key in obj) {
this._query[key] = obj[key];
}
var req = this.request();
var query = qs.stringify(obj);
if (!query.length) return this;
req.path += (~req.path.indexOf('?') ? '&' : '?') + query;
return this;

@@ -450,3 +450,2 @@ };

, data = this._data
, query = this._query
, url = this.url;

@@ -456,3 +455,3 @@

if (0 != url.indexOf('http')) url = 'http://' + url;
url = parse(url);
url = parse(url, true);

@@ -465,12 +464,2 @@ // options

if (null == url.query) url.query = '';
// querystring
if (query) {
query = qs.stringify(query);
url.query += (url.query.length ? '&' : '') + query;
}
if (url.query.length) options.path += '?' + url.query;
// initiate request

@@ -492,2 +481,5 @@ var mod = exports.protocols[url.protocol];

// query
this.query(url.query);
return req;

@@ -494,0 +486,0 @@ };

{
"name": "superagent"
, "version": "0.6.0"
, "version": "0.7.0"
, "description": "elegant & feature rich browser / node HTTP with a fluent API"

@@ -16,3 +16,3 @@ , "keywords": ["http", "ajax", "request", "agent"]

, "devDependencies": {
"express": "3.0.0beta5"
"express": "3.0.0beta4"
, "should": "*"

@@ -19,0 +19,0 @@ , "mocha": "*"

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