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

code-repositories-api-node

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

code-repositories-api-node - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

26

index.js

@@ -41,10 +41,12 @@ const request = require('request-promise');

var options = { method, headers, uri };
if(opts.formData === true) {
options.formData = form;
}
else {
options.form = form;
if(opts.json !== false) {
options.json = true;
if(['PUT', 'POST'].indexOf(method) !== -1) {
if(opts.formData === true) {
options.formData = form;
}
else {
options.form = form;
if(opts.json !== false) {
options.json = true;
}
}
}

@@ -73,2 +75,12 @@ return { uri, headers, options };

RequestStrategy.prototype.delete = function(form, opts) {
var { uri, headers, options } = this.getOptions('DELETE', form, opts);
console.log(uri);
return request(options)
.catch(err => {
console.log('## Error while DELETEing', (typeof err === 'string' ? err.substr(0, 100): Object.keys(err)), err.statusCode, err.name);
throw err;
})
};
RequestStrategy.prototype.setup = function(baseUri, relativePath, headers) {

@@ -75,0 +87,0 @@ // console.log('requestStrategy.setup', baseUri, relativePath, headers);

{
"name": "code-repositories-api-node",
"version": "0.1.1",
"version": "0.1.2",
"author": "Benoît Hubert <benoithubert@gmail.com>",

@@ -5,0 +5,0 @@ "files": [

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