New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

httpinvoke

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

httpinvoke

HTTP client for JavaScript

  • 0.0.4
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

httpinvoke

HTTP client for JavaScript.

  • Sends requests and receives responses.
  • Lets you monitor upload and download progress, if supported by platform.
  • Works on web browser and Node.js platforms.
  • Detects the presence of CommonJS and AMD script loaders.
  • Available on npm and GitHub.
  • Supports npm, Bower and Component package managers.

browser support

Usage

Loading

Load using your package manager, or use directly in web browser by adding <script src="/path_to_http_invoke/httpinvoke-browser.js"></script> to your HTML file.

Example

httpinvoke('http://updates.html5rocks.com', {
    finished: function(err, result) {
        if(err) {
            return console.log('Failure', err);
        }
        console.log('Success', result);
    }
});

API reference

httpinvoke is just one function. The arguments are: uri, method, options.

uri argument

Can be any http or https URI. Type is string. Required.

method argument

Any HTTP method. Type is string. Optional, defaults to a string 'GET'.

options argument

A collection of various options. Type is object. Optional, defaults to an object with no properties.

uploading option

TODO. Type is function. The arguments are: initial, current, final. Optional, defaults to a no-op function.

initial argument

TODO. Type is number.

current argument

TODO. Type is number.

final argument

TODO. Type is number.

downloading option

TODO. Exactly the same as uploading option.

gotStatus option

TODO. Type is function. The arguments are: status, headers. Optional, defaults to a no-op function.

status argument

HTTP response status code. Type is number.

headers argument

HTTP response headers. TODO

finished option

TODO. Type is function. The arguments are: err, output. Optional, defaults to a no-op function.

err argument

TODO. Type is object. Can either be null or instance of Error.

output argument

TODO. Type is string.

input option

TODO. Type is string. Optional, defaults to null.

License

The MIT License (MIT)

Copyright (c) 2013 Vytautas Jakutis <vytautas@jakut.is>

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Keywords

FAQs

Package last updated on 01 Aug 2013

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

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