<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Multiple requests to one notification]]></title><description><![CDATA[<p dir="auto">This is more of a javascript question I guess…</p>
<p dir="auto">Let’s take an example where request gets a result, parses it and sends it to the client:<br />
<a href="https://github.com/mykle1/MMM-Cocktails/blob/master/node_helper.js" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/mykle1/MMM-Cocktails/blob/master/node_helper.js</a></p>
<p dir="auto">Now how would I go about if I in that getCocktails function wanted to request 2 URL’s, parse them to one combined result and send that as payload with one socket notification?</p>
<p dir="auto">Or maybe I should do it in a completely different way?</p>
]]></description><link>https://forum.magicmirror.builders/topic/10351/multiple-requests-to-one-notification</link><generator>RSS for Node</generator><lastBuildDate>Fri, 10 Jul 2026 11:19:08 GMT</lastBuildDate><atom:link href="https://forum.magicmirror.builders/topic/10351.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 25 Apr 2019 19:38:55 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Multiple requests to one notification on Sat, 04 May 2019 15:18:53 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/retroflex" aria-label="Profile: retroflex">@<bdi>retroflex</bdi></a>  i have not tried retry</p>
]]></description><link>https://forum.magicmirror.builders/post/56655</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/56655</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Sat, 04 May 2019 15:18:53 GMT</pubDate></item><item><title><![CDATA[Reply to Multiple requests to one notification on Sat, 04 May 2019 10:46:57 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sdetweil" aria-label="Profile: sdetweil">@<bdi>sdetweil</bdi></a> thanks again for the tip about promises. I managed to get it working with request-promise and Promise.All in my new MMM-Fortnite module. So now my son is happy 😀</p>
<p dir="auto">Since the API I’m using is a bit unstable I also tried request-promise-retry package, but never got any usable return value from that. Do you have any experience with retries?</p>
]]></description><link>https://forum.magicmirror.builders/post/56648</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/56648</guid><dc:creator><![CDATA[retroflex]]></dc:creator><pubDate>Sat, 04 May 2019 10:46:57 GMT</pubDate></item><item><title><![CDATA[Reply to Multiple requests to one notification on Fri, 26 Apr 2019 16:50:56 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/retroflex" aria-label="Profile: retroflex">@<bdi>retroflex</bdi></a>  YOU might not be using promises, but request() is!..there is also promise.cascade()… a, then b, then c …</p>
]]></description><link>https://forum.magicmirror.builders/post/56472</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/56472</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Fri, 26 Apr 2019 16:50:56 GMT</pubDate></item><item><title><![CDATA[Reply to Multiple requests to one notification on Fri, 26 Apr 2019 16:12:23 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sdetweil" aria-label="Profile: sdetweil">@<bdi>sdetweil</bdi></a> Great, thanks a lot! Now I remember I read up on promises a long time ago, but never got around to use it. I’ll try it out when I have the time.</p>
<p dir="auto">Maybe I’ll learn javascript for real some day, it’s just every time I program anything I just get annoyed by the loose typing :)</p>
]]></description><link>https://forum.magicmirror.builders/post/56469</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/56469</guid><dc:creator><![CDATA[retroflex]]></dc:creator><pubDate>Fri, 26 Apr 2019 16:12:23 GMT</pubDate></item><item><title><![CDATA[Reply to Multiple requests to one notification on Thu, 25 Apr 2019 19:49:06 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/retroflex" aria-label="Profile: retroflex">@<bdi>retroflex</bdi></a> see <a href="https://stackoverflow.com/questions/19911429/nodejs-multiple-http-requests-in-loop" target="_blank" rel="noopener noreferrer nofollow ugc">https://stackoverflow.com/questions/19911429/nodejs-multiple-http-requests-in-loop</a></p>
<p dir="auto">to use an array to hold the concurrent promises and then wait for all to complete (vs any() which triggers if any complete)</p>
]]></description><link>https://forum.magicmirror.builders/post/56441</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/56441</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Thu, 25 Apr 2019 19:49:06 GMT</pubDate></item></channel></rss>