Git Product home page Git Product logo

obsidian-http-request's Introduction

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.2:

    • Replaced deprecated mocha-phantomjs by mocha-headless-chrome to run tests (@jbghoul, 27)
    • Fix: added missing lodash dependency (@jbghoul, #28)
  • 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

obsidian-http-request's People

Contributors

dependabot[bot] avatar flozz avatar greenkeeper[bot] avatar greenkeeperio-bot avatar jbghoul avatar jbghoul-wanadev avatar perriern avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

jbghoul

obsidian-http-request's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.