Rest & Web-Scraping

23 views
Skip to first unread message

Paul Tiseo

unread,
Dec 19, 2014, 9:38:43 AM12/19/14
to cuj...@googlegroups.com
I am using rest.js to work with a SaaS product's API layer. They have a decent API, except for the fact that they don't seem to want you to be able to pull down attachments. Can I use rest.js to do web-scraping, similar to how most people use Request (github.com/request/request)?

Scott Andrews

unread,
Dec 19, 2014, 6:29:08 PM12/19/14
to cuj...@googlegroups.com
rest.js should work as its fundamentally just HTTP. One caveat is that binary responses are currently not handled very well, but it's something I've been thinking about and have a couple ideas to try.

The main difference with rest and request is how you interact with the content. The interceptor model in rest.js makes configuring a custom client very easy. rest.js is promise based whereas request.js is stream based. Streams are better for large entities, but more annoying for small ones.

Let me know if you run into any issues.

 -Scott

Get Acompli email app now




On Fri, Dec 19, 2014 at 6:38 AM -0800, "Paul Tiseo" <paulx...@gmail.com> wrote:

I am using rest.js to work with a SaaS product's API layer. They have a decent API, except for the fact that they don't seem to want you to be able to pull down attachments. Can I use rest.js to do web-scraping, similar to how most people use Request (github.com/request/request)?

--
You received this message because you are subscribed to the Google Groups "cujojs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cujojs+un...@googlegroups.com.
To post to this group, send email to cuj...@googlegroups.com.
Visit this group at http://groups.google.com/group/cujojs.
To view this discussion on the web visit https://groups.google.com/d/msgid/cujojs/f90035f7-18b2-4f5e-b262-1b8be71d9179%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages