Socket
Book a DemoInstallSign in
Socket

obsidian-http-request

Package Overview
Dependencies
Maintainers
2
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

obsidian-http-request

Helper library to download assets (ajax) directly or through a proxy

1.5.1
Source
npmnpm
Version published
Weekly downloads
558
0.18%
Maintainers
2
Weekly downloads
 
Created
Source

Obsidian HTTP Request

Tests NPM Version License Discord

Obsidian HTTP Request is a helper library that allows you to download assets and make HTTP requests either directly or through a proxy (to avoid CORS issues, for example when using images from an other domain with a canvas).

Obsidian HTTP Request Schemas

Install

To install Obsidian HTTP Request run the following command:

npm install obsidian-http-request

Documentation

You can find the library documentation at the following address:

Example

const httpRequest = require("obsidian-http-request");

httpRequest.getText("http://example.com/hello.txt")
    .then(function(result) {
        console.log(result);
    })
    .catch(function(error) {
        console.error(error);
    });

Contributing

Questions

If you have any question, you can:

Bugs

If you found a bug, please open an issue on Github with as much information as possible.

Pull Requests

Please consider filing a bug before starting to work on a new feature. This will allow us to discuss the best way to do it. This is of course not necessary if you just want to fix some typo or small errors in the code.

Coding Style / Lint

To check coding style, run the follwoing command:

npx grunt jshint

Tests

Tu run tests, use the following command:

npx grunt test

Changelog

  • [NEXT] (changes on master that have not been released yet):

    • Nothing yet ;)
  • v1.5.1:

    • Updated dependencies (@jbghoul, #26)
  • v1.5.0:

    • Add a method to get the result as Blob (#20)
  • v1.4.0:

    • Adds status code and message in Error objects (#19)
  • v1.3.2:

    • Accepts 2xx HTTP status code and not only 200 (client side)
  • v1.3.1:

    • Proxy do not returns an error anymore when server respond with 2xx stvatus code (#14)
  • v1.3.0:

    • Log URLs in error messages
  • v1.2.0:

    • Generic request and requestProxy method (to be able to use different methods than GET, with more options) #6
    • Proxyfied methods can now be used with relative links
    • Better documentation
  • v1.1.4:

    • Updates dependencies

Keywords

obsidian

FAQs

Package last updated on 04 May 2023

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.