kwent / syno

Simple Node.js wrapper and CLI for Synology DSM REST API 5.x and 6.x.
http://kwent.github.io/syno
MIT License
316 stars 51 forks source link

Support for Quickconnect; Wait for redirect #48

Open proohit opened 4 years ago

proohit commented 4 years ago

It would be awesome if the library supports quickconnect (QC). The problem mainly is that quickconnect first attempts to redirect to the "correct" url.

When making a request e.g. via CLI, the "Connecting..." page gets parsed by syno.js instead of the actual JSON data. Thus, there will be several exceptions while parsing the response.

Maybe it could wait for redirects before parsing the final response data? (https://stackoverflow.com/questions/7323932/how-do-you-follow-an-http-redirect-in-node-js)

kwent commented 4 years ago

That is a good idea. Feel free to open a PR. I would love to support quickconnect in syno.js