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

popsicle

Package Overview
Dependencies
Maintainers
1
Versions
99
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

popsicle - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

logo.svg

2

package.json
{
"name": "popsicle",
"version": "0.0.2",
"version": "0.0.3",
"description": "Simple HTTP requests for node and the browser",

@@ -5,0 +5,0 @@ "main": "popsicle.js",

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

# Popsicle
# ![Popsicle](https://cdn.rawgit.com/blakeembrey/popsicle/master/logo.svg)

@@ -27,6 +27,10 @@ [![NPM version][npm-image]][npm-url]

Then apply the polyfill (Browserify and node shown below).
Apply the polyfill.
```javascript
// Node and browserify
require('es6-promise').polyfill();
// Browsers
window.ES6Promise.polyfill();
```

@@ -38,2 +42,3 @@

var request = require('popsicle');
// var request = window.popsicle;

@@ -52,3 +57,2 @@ request({

.then(function (res) {
console.log(res instanceof request.Response); //=> true
console.log(res.status); // => 200

@@ -115,3 +119,3 @@ console.log(res.body); //=> { ... }

req.catch(function (err) {
console.log(err); //=> { message: 'Request aborted' }
console.log(err); //=> { message: 'Request aborted', aborted: true }
});

@@ -163,3 +167,3 @@ ```

// Things worked!
// Success!
});

@@ -198,6 +202,6 @@ ```

* **abort error** The request was aborted by user intervention (`err.abort`)
* **timeout error* The request timed out (`err.timeout`)
* **timeout error** The request timed out (`err.timeout`)
* **unavailable error** Unable to connect to the remote URL (`err.unavailable`)
* **blocked error** The request was blocked (HTTPS -> HTTP) (browsers, `err.blocked`)
* **csp error** Request violates the documents Content Security Policy (browsers, `err.csp`)
* **unavailable error** Unable to connect to the remote URL (`err.unavailable`)
* **blocked error** The request was blocked - HTTPS -> HTTP (browsers, `err.blocked`)

@@ -232,14 +236,8 @@ ### Plugins

Install dependencies.
Install dependencies and run the test runners (node and browsers using Karma).
```bash
npm install
npm install && npm test
```
Run the test runner, which automatically tests node and browsers using Karma.
```bash
npm test
```
## License

@@ -246,0 +244,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