Giter VIP home page Giter VIP logo

Comments (6)

tusharmath avatar tusharmath commented on July 17, 2024

You can pass the auth params to the request() function — https://github.com/tusharmath/Multi-threaded-downloader#HTTP.request

from multi-threaded-downloader.

pantchox avatar pantchox commented on July 17, 2024

how?
the master branch does README not have clear examples on how to use MTD, which makes it very unattractive to use.

from multi-threaded-downloader.

tusharmath avatar tusharmath commented on July 17, 2024

Sorry if the README isn't clear. I'd be happy to merge a PR if you think it can be made better.

Internally mtd uses the npm's request module for making HTTP requests. So to create a new HTTP request with auth you could do something like —

const response$ = HTTP.request({
  url : 'a.b.c',
  auth: {
    'user': 'username',
    'pass': 'password',
    'sendImmediately': false
  }
}) 

Read more — https://www.npmjs.com/package/request#http-authentication

from multi-threaded-downloader.

pantchox avatar pantchox commented on July 17, 2024

Thanks.
I mean that in the other branches (which i have no idea which one is the most update one) the README is more clear and with examples of the options.

Thanks for MTD its really good!

from multi-threaded-downloader.

tusharmath avatar tusharmath commented on July 17, 2024

@pantchox master is the most updated branch right now. I'd be more than happy to fix the documentation.

from multi-threaded-downloader.

pantchox avatar pantchox commented on July 17, 2024

A simple basic usage example such as requiring the module and instantiating the class with the download options and events (start, pause, resume, finish) would make it more clear, its nice that the library looks very maintained and all the objects are being described what they do and all BUT there is NON of any examples of simple usage, digging in other branches/tags shows examples but how do i know they are aligned with this latest release.
I am not trying to be annoying or having something served on a silver plate i am just saying that simple users like me need to have a concrete USAGE example.
Thanks!

from multi-threaded-downloader.

Related Issues (20)

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.