Socket
Socket
Sign inDemoInstall

request-json

Package Overview
Dependencies
Maintainers
1
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

request-json - npm Package Compare versions

Comparing version 0.4.6 to 0.4.7

2

main.js

@@ -1,2 +0,2 @@

// Generated by CoffeeScript 1.6.3
// Generated by CoffeeScript 1.7.1
(function() {

@@ -3,0 +3,0 @@ var fs, parseBody, request, url;

@@ -16,3 +16,3 @@ {

],
"version": "0.4.6",
"version": "0.4.7",
"homepage": "https://github.com/mycozycloud/request-json/",

@@ -37,3 +37,3 @@ "bugs": {

"dependencies": {
"request": "2.21.0"
"request": "2.34.0"
},

@@ -40,0 +40,0 @@ "devDependencies": {

@@ -21,4 +21,2 @@ ## About

with Javascript:
```javascript

@@ -52,27 +50,4 @@ request = require('request-json');

with Coffeescript:
```javascript
request = require('request-json')
client = request.newClient 'http://localhost:8888/'
data = title: 'my title', content: 'my content'
client.post 'posts/', data, (err, res, body) ->
console.log response.statusCode
client.get 'posts/', (err, res, body) ->
console.log body.rows[0].title
data = title: 'my new title'
client.put 'posts/123/', data, (err, res, body) ->
console.log response.statusCode
client.del 'posts/123/', (err, res, body) ->
console.log response.statusCode
```
### Extra : files
with Javascript:
```javascript

@@ -96,13 +71,2 @@ data = {

with Coffeescript:
```javascript
data = name: "test"
client.sendFile 'attachments/', './test.png', data, (err, res, body) ->
console.log err if err
client.saveFile 'attachments/test.png', './test-get.png', (err, res, body) ->
console.log err if err
```
sendFile can support file path, stream, array of file path and array of

@@ -116,4 +80,2 @@ streams. Each file is stored with the key 'file + index' (file0, file1,

with Javascript:
```javascript

@@ -127,9 +89,10 @@ client.setBasicAuth('john', 'secret');

## Who use it?
with Coffeescript:
request-json is downloaded more than 2000 times each month. Here are the
companies which use it for their API clients:
```javascript
client.setBasicAuth 'john', 'secret'
client.get 'private/posts/', (err, res, body) ->
console.log body.rows[0].title
```
* [Cozy Cloud](http://cozy.io) Personal Cloud Solutions
* [Leank Kit](http://leankit.com/) Team Collaboration Solutions
* [Forecast](http://forecast.io/) Weather Forecasting
* [JS Report](http://jsreport.net/) Reporting Platform

Sorry, the diff of this file is not supported yet

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