request-json
Advanced tools
Comparing version 0.5.0 to 0.5.1
14
main.js
// Generated by CoffeeScript 1.7.1 | ||
(function() { | ||
var buildOptions, clone, fs, merge, parseBody, request, url; | ||
var buildOptions, clone, depd, deprecate, fs, merge, parseBody, request, url; | ||
@@ -11,2 +11,6 @@ request = require("request"); | ||
depd = require("depd"); | ||
deprecate = depd("request-json"); | ||
clone = function(obj) { | ||
@@ -68,2 +72,10 @@ var key, result; | ||
} | ||
deprecate("newClient() is deprecated, please use createClient()"); | ||
return exports.createClient(url, options); | ||
}; | ||
exports.createClient = function(url, options) { | ||
if (options == null) { | ||
options = {}; | ||
} | ||
return new exports.JsonClient(url, options); | ||
@@ -70,0 +82,0 @@ }; |
@@ -20,3 +20,3 @@ { | ||
], | ||
"version": "0.5.0", | ||
"version": "0.5.1", | ||
"homepage": "https://github.com/mycozycloud/request-json/", | ||
@@ -44,2 +44,3 @@ "bugs": { | ||
"dependencies": { | ||
"depd": "1.0.0", | ||
"request": "2.45.0" | ||
@@ -46,0 +47,0 @@ }, |
@@ -17,3 +17,3 @@ ## About | ||
[![Build | ||
Status](https://travis-ci.org/mycozycloud/request-json.png?branch=master)](https://travis-ci.org/mycozycloud/request-json) | ||
Status](https://travis-ci.org/cozy/request-json.png?branch=master)](https://travis-ci.org/mycozycloud/request-json) | ||
@@ -24,3 +24,3 @@ ## How it works | ||
request = require('request-json'); | ||
var client = request.newClient('http://localhost:8888/'); | ||
var client = request.createClient('http://localhost:8888/'); | ||
@@ -58,2 +58,5 @@ var data = { | ||
**Note:** Previously you should call `newClient()` but now it is renamed to `createClient()`. | ||
You still can use `newClient()` though it will throw deprecation message. | ||
### Extra : files | ||
@@ -60,0 +63,0 @@ |
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
14016
254
105
2
+ Addeddepd@1.0.0
+ Addeddepd@1.0.0(transitive)