Socket
Socket
Sign inDemoInstall

request

Package Overview
Dependencies
37
Maintainers
3
Versions
126
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.49.0 to 2.50.0

8

CHANGELOG.md
## Change Log
### v2.50.0 (2014/12/09)
- [#1308](https://github.com/request/request/pull/1308) Add browser test to keep track of browserify compability. (@eiriksm)
- [#1299](https://github.com/request/request/pull/1299) Add optional support for jsonReviver (@poislagarde)
- [#1277](https://github.com/request/request/pull/1277) Add Coveralls configuration (@simov)
- [#1307](https://github.com/request/request/pull/1307) Upgrade form-data, add back browserify compability. Fixes #455. (@eiriksm)
- [#1305](https://github.com/request/request/pull/1305) Fix typo in README.md (@LewisJEllis)
- [#1288](https://github.com/request/request/pull/1288) Update README.md to explain custom file use case (@cliffcrosland)
### v2.49.0 (2014/11/28)

@@ -4,0 +12,0 @@ - [#1295](https://github.com/request/request/pull/1295) fix(proxy): no-proxy false positive (@oliamb)

15

package.json

@@ -10,3 +10,3 @@ {

],
"version": "2.49.0",
"version": "2.50.0",
"author": "Mikeal Rogers <mikeal.rogers@gmail.com>",

@@ -29,3 +29,3 @@ "repository": {

"forever-agent": "~0.5.0",
"form-data": "~0.1.0",
"form-data": "~0.2.0",
"json-stringify-safe": "~5.0.0",

@@ -45,7 +45,16 @@ "mime-types": "~1.0.1",

"scripts": {
"test": "npm run lint && node node_modules/.bin/taper tests/test-*.js",
"test": "npm run lint && node node_modules/.bin/taper tests/test-*.js && npm run test-browser",
"test-browser": "browserify tests/browser/test.js -o tests/browser/test-browser.js && karma start tests/browser/karma.conf.js",
"lint": "node node_modules/.bin/eslint lib/ *.js tests/ && echo Lint passed."
},
"devDependencies": {
"browserify": "~5.9.1",
"coveralls": "~2.11.2",
"eslint": "0.5.1",
"function-bind": "~1.0.0",
"istanbul": "~0.3.2",
"karma": "~0.12.21",
"karma-cli": "0.0.4",
"karma-phantomjs-launcher": "~0.1.4",
"karma-tap": "~1.0.1",
"rimraf": "~2.2.8",

@@ -52,0 +61,0 @@ "tape": "~3.0.0",

8

README.md

@@ -259,6 +259,7 @@ # Request — Simplified HTTP client

attachments: [
fs.createReadStream(__dirname + '/attacment1.jpg'),
fs.createReadStream(__dirname + '/attachment1.jpg'),
fs.createReadStream(__dirname + '/attachment2.jpg')
],
// Pass optional meta-data with an 'options' object with style: {value: DATA, options: OPTIONS}
// Use case: for some types of streams, you'll need to provide "file"-related information manually.
// See the `form-data` README for more information about options: https://github.com/felixge/node-form-data

@@ -281,3 +282,3 @@ custom_file: {

For advanced cases, you can the form-data object itself via `r.form()`. This can be modified until the request is fired on the next cycle of the event-loop. (Note that this calling `form()` will clear the currently set form data for that request.)
For advanced cases, you can access the form-data object itself via `r.form()`. This can be modified until the request is fired on the next cycle of the event-loop. (Note that this calling `form()` will clear the currently set form data for that request.)

@@ -318,3 +319,3 @@ ```javascript

{
'content-type': 'application/json',
'content-type': 'application/json',
body: JSON.stringify({foo: 'bar', _attachments: {'message.txt': {follows: true, length: 18, 'content_type': 'text/plain' }}})

@@ -543,2 +544,3 @@ },

* `json` - sets `body` but to JSON representation of value and adds `Content-type: application/json` header. Additionally, parses the response body as JSON.
* `jsonReviver` - a [reviver function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse) that will be passed to `JSON.parse()` when parsing a JSON response body.
* `preambleCRLF` - append a newline/CRLF before the boundary of your `multipart/form-data` request.

@@ -545,0 +547,0 @@ * `postambleCRLF` - append a newline/CRLF at the end of the boundary of your `multipart/form-data` request.

@@ -1311,3 +1311,3 @@ 'use strict'

try {
response.body = JSON.parse(response.body)
response.body = JSON.parse(response.body, self._jsonReviver)
} catch (e) {}

@@ -1486,3 +1486,3 @@ }

if (typeof val === 'boolean') {
if (typeof self.body === 'object') {
if (self.body !== undefined) {
self.body = safeStringify(self.body)

@@ -1500,2 +1500,6 @@ if (!self.hasHeader('content-type')) {

if (typeof self.jsonReviver === 'function') {
self._jsonReviver = self.jsonReviver
}
return self

@@ -1502,0 +1506,0 @@ }

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc