New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

http-francis

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

http-francis

description of http-francis

latest
Source
npmnpm
Version
0.1.6
Version published
Maintainers
1
Created
Source

http-francis

Build Status Coverage Status npm version Bower version GitHub version

an http class to make requests over the net with retry and interval between them

Usage

var Francis = require('http-francis');
var francis = new Francis.Http({
    method:"GET", // JSONP, POST, DELETE, PUT
    url:"https://httpbin.org/get"
});

Installation

NPM

npm install --save http-francis

You can found the library ready for production on node_modules/http-francis/dist/dist.js

Bower

bower install --save http-francis

You can found the library ready for production on bower_components/http-francis/dist/dist.js

Example

var Francis = require('http-francis');
var francis = new Francis.Http({
    method:"GET", // JSONP, POST, DELETE, PUT
    url:"https://httpbin.org/get"
});

francis.promise.then((response) => { 
    response // [data, xhr.status, xhr]
 })

Retrieve an image as base64

var Francis = require('http-francis');
var francis = new Francis.Http({
    method: "GET",
    url: "https://someimageurl/image.png",
    responseType: "blob",
    mimeType: "image/png",
    onProgress:(percentage)=>{ 
        // there must be Content-Length header in the response to get the right percentage
        // otherwise percentage is a NaN
    }
});

francis.promise.then((response) => { 
    var imgTag = document.createElement("img");
    imgTag.src = response[0];
    document.body.appendChild(imgTag);
    
 })

Documentation

To read documentation, go to:

http://d-mobilelab.github.io/http-francis/0.1.2

Replace 0.1.2 with the version of the documentation you want to read.

FAQs

Package last updated on 05 Oct 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts