Socket
Socket
Sign inDemoInstall

trooba-xhr-transport

Package Overview
Dependencies
5
Maintainers
2
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    trooba-xhr-transport

AJAX/XHR transport for trooba pipeline


Version published
Weekly downloads
2
Maintainers
2
Install size
576 kB
Created
Weekly downloads
 

Changelog

Source

v2.0.2

Fixed: the handler fails to handle 2XX responses

Readme

Source

trooba-xhr-transport

codecov Build Status NPM Downloads Known Vulnerabilities

XHR transport for trooba pipeline to make CORS RESTful service calls from the browser.

Get Involved

Install

npm install trooba-xhr-transport --save

Usage

var xhrTransport = require('trooba-xhr-transport');
require('trooba')
    .use(xhrTransport, {
        protocol: 'http:',
        hostname: 'www.google.com'
        socketTimeout: 1000
    })
    .build()
    .create('client:default')
    .get({
        q: 'nike'
    })
    .set('some', 'header')
    .end(function (err, response) {
        console.log(err, response && response.body)
    });

For a real browser example, take a look at unit test. It uses lasso-js and marko-js to bundle resources into browser page including trooba xhr implementation.

Keywords

FAQs

Last updated on 18 Dec 2017

Did you know?

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

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