Obsidian HTTP Request
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).
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