Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

got

Package Overview
Dependencies
Maintainers
2
Versions
178
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

got - npm Package Compare versions

Comparing version 2.0.0 to 2.1.0

17

index.js

@@ -25,2 +25,9 @@ 'use strict';

var body = opts.body;
delete opts.body;
if (body && opts.method === undefined) {
opts.method = 'POST';
}
// returns a proxy stream to the response

@@ -51,3 +58,3 @@ // if no callback has been provided

var req = fn.get(arg, function (response) {
var req = fn.request(arg, function (response) {
var statusCode = response.statusCode;

@@ -94,2 +101,10 @@ var res = response;

}
if (!body) {
req.end();
return;
}
req.write(body);
req.end();
};

@@ -96,0 +111,0 @@

4

package.json
{
"name": "got",
"version": "2.0.0",
"version": "2.1.0",
"description": "Simplified HTTP/HTTPS requests",

@@ -36,3 +36,3 @@ "license": "MIT",

"read-all-stream": "^0.1.0",
"timed-out": "^1.0.0"
"timed-out": "^2.0.0"
},

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

@@ -60,2 +60,8 @@ # got [![Build Status](https://travis-ci.org/sindresorhus/got.svg?branch=master)](https://travis-ci.org/sindresorhus/got)

##### options.body
Type: `string`, `Buffer`
Body, that will be sent with `POST` request. If present in `options` and `options.method` is not set - `options.method` will be set to `POST`.
##### options.timeout

@@ -62,0 +68,0 @@

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