Skip to content

Commit

Permalink
reverting change to attempt to smartly determine data on put or post
Browse files Browse the repository at this point in the history
  • Loading branch information
brozeph committed Feb 26, 2019
1 parent 697db2b commit 303d813
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "reqlib",
"version": "1.0.3",
"version": "1.0.4",
"description": "A library to simplify REST API requests and to provide utilities for handling common REST API consumer scenarios ",
"main": "dist",
"scripts": {
Expand Down
10 changes: 0 additions & 10 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -634,11 +634,6 @@ class Request extends events.EventEmitter {
options = {};
}

if (typeof options === 'string' && isEmpty(data)) {
data = options;
options = {};
}

options = ensureOptions(options);
options.method = 'POST';
return await this.call(options, data, callback);
Expand All @@ -656,11 +651,6 @@ class Request extends events.EventEmitter {
options = {};
}

if (typeof options === 'string' && isEmpty(data)) {
data = options;
options = {};
}

options = ensureOptions(options);
options.method = 'PUT';
return await this.call(options, data, callback);
Expand Down

0 comments on commit 303d813

Please sign in to comment.