Comparing version 2.1.0 to 2.2.0
# Changelog | ||
## 2.2.0 | ||
- Gangway will not send a body unless it is specified. Before this | ||
version, it would default to an empty object. | ||
## 2.1.0 | ||
@@ -4,0 +9,0 @@ |
@@ -11,2 +11,6 @@ # Gangway Documentation | ||
## Recipes | ||
1. [Aborting requests](recipes/aborting-requests.md) | ||
## API | ||
@@ -13,0 +17,0 @@ |
{ | ||
"name": "gangway", | ||
"version": "2.1.0", | ||
"version": "2.2.0", | ||
"description": "A client-side API abstraction layer", | ||
@@ -5,0 +5,0 @@ "engines": { |
@@ -22,3 +22,2 @@ var Mock = require('./mock') | ||
message.type(options.type) | ||
.send(options.body) | ||
.query(options.buildQuery(options.query)) | ||
@@ -28,2 +27,6 @@ .set(options.headers) | ||
if (options.body) { | ||
message.send(options.body) | ||
} | ||
options.beforeSend(message) | ||
@@ -30,0 +33,0 @@ |
@@ -34,3 +34,3 @@ /** | ||
return next ? assign(memo, next, { | ||
body : assign(memo.body, next.body), | ||
body : next.body ? assign(memo.body, next.body) : next.body, | ||
params : assign(memo.params, next.params), | ||
@@ -37,0 +37,0 @@ query : assign(memo.query, next.query), |
@@ -11,2 +11,7 @@ var prepare = require('../src/prepare') | ||
it ('does not set the body to an object if not given one', function() { | ||
var answer = prepare({}, undefined, { fiz: 'buzz'}) | ||
assert.equal(answer.body, undefined) | ||
}) | ||
}) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
53745
35
977