<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Making request synchronous in Developers Questions</title>
    <link>https://community.esri.com/t5/developers-questions/making-request-synchronous/m-p/277560#M1782</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Although I see you have the&amp;nbsp;&lt;SPAN style="background-color: #ffffff;"&gt;dojo class "request/xhr" property of&lt;/SPAN&gt; &amp;nbsp;sync set to a boolean value of true, then object still has a .then method promise.&lt;/P&gt;&lt;P&gt;Can you help me understand how this is synchronous please?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 01 Aug 2019 15:24:42 GMT</pubDate>
    <dc:creator>AndresCastillo</dc:creator>
    <dc:date>2019-08-01T15:24:42Z</dc:date>
    <item>
      <title>Making request synchronous</title>
      <link>https://community.esri.com/t5/developers-questions/making-request-synchronous/m-p/277556#M1778</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there a way to make the esri/request synchronous?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;esriRequest(url, {&lt;BR /&gt; responseType: "json",&lt;BR /&gt; callbackParamName: "callback"&lt;BR /&gt; }).then(function(response){&lt;BR /&gt; console.log(resp);&lt;BR /&gt; });&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Feb 2017 16:22:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/making-request-synchronous/m-p/277556#M1778</guid>
      <dc:creator>roshnibasu</dc:creator>
      <dc:date>2017-02-24T16:22:58Z</dc:date>
    </item>
    <item>
      <title>Re: Making request synchronous</title>
      <link>https://community.esri.com/t5/developers-questions/making-request-synchronous/m-p/277557#M1779</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hy&amp;nbsp;&lt;A href="https://community.esri.com/migrated-users/247993"&gt;roshni basu&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I ask myslef the same question. Have you found a way to do that?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Flavie&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Mar 2018 08:12:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/making-request-synchronous/m-p/277557#M1779</guid>
      <dc:creator>FlavieMORAUX1</dc:creator>
      <dc:date>2018-03-27T08:12:50Z</dc:date>
    </item>
    <item>
      <title>Re: Making request synchronous</title>
      <link>https://community.esri.com/t5/developers-questions/making-request-synchronous/m-p/277558#M1780</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Flavie,&lt;/P&gt;&lt;P&gt;I had resolved this issue by making an API at my java code. And then call that API from my javascript making call synchronous.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Roshni&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Mar 2018 08:53:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/making-request-synchronous/m-p/277558#M1780</guid>
      <dc:creator>roshnibasu</dc:creator>
      <dc:date>2018-03-27T08:53:15Z</dc:date>
    </item>
    <item>
      <title>Re: Making request synchronous</title>
      <link>https://community.esri.com/t5/developers-questions/making-request-synchronous/m-p/277559#M1781</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Roshni,&lt;/P&gt;&lt;P&gt;I found another solution, I&amp;nbsp;request myself with dojo class "request/xhr".&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Flavie&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;var layerInfo = null;&lt;BR /&gt;&lt;BR /&gt; var requestURL = layerUrl + "?f=json";&lt;BR /&gt; requestXHR(requestURL, {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;handleAs: "json",&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;STRONG&gt;sync: true,&lt;/STRONG&gt;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;headers: {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;"X-Requested-With": null&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR /&gt; }).then(function(data){&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;layerInfo = data;&lt;BR /&gt; });&lt;BR /&gt;&lt;BR /&gt; return layerInfo;&amp;nbsp;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Mar 2018 09:52:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/making-request-synchronous/m-p/277559#M1781</guid>
      <dc:creator>FlavieMORAUX1</dc:creator>
      <dc:date>2018-03-30T09:52:40Z</dc:date>
    </item>
    <item>
      <title>Re: Making request synchronous</title>
      <link>https://community.esri.com/t5/developers-questions/making-request-synchronous/m-p/277560#M1782</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Although I see you have the&amp;nbsp;&lt;SPAN style="background-color: #ffffff;"&gt;dojo class "request/xhr" property of&lt;/SPAN&gt; &amp;nbsp;sync set to a boolean value of true, then object still has a .then method promise.&lt;/P&gt;&lt;P&gt;Can you help me understand how this is synchronous please?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Aug 2019 15:24:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/making-request-synchronous/m-p/277560#M1782</guid>
      <dc:creator>AndresCastillo</dc:creator>
      <dc:date>2019-08-01T15:24:42Z</dc:date>
    </item>
    <item>
      <title>Re: Making request synchronous</title>
      <link>https://community.esri.com/t5/developers-questions/making-request-synchronous/m-p/277561#M1783</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Andres,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check the doc for dojo/request/xhr here:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://dojotoolkit.org/reference-guide/1.10/dojo/request/xhr.html" title="https://dojotoolkit.org/reference-guide/1.10/dojo/request/xhr.html"&gt;dojo/request/xhr — The Dojo Toolkit - Reference Guide&lt;/A&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/457076_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Aug 2019 03:25:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/making-request-synchronous/m-p/277561#M1783</guid>
      <dc:creator>LeoLiu1</dc:creator>
      <dc:date>2019-08-15T03:25:18Z</dc:date>
    </item>
    <item>
      <title>Re: Making request synchronous</title>
      <link>https://community.esri.com/t5/developers-questions/making-request-synchronous/m-p/277562#M1784</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Leo.&lt;/P&gt;&lt;P&gt;I understand that the&amp;nbsp;requestXHR function is set to sync.&lt;/P&gt;&lt;P&gt;But after it runs, it returns a promise, which would make it async again, right?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Aug 2019 12:11:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/making-request-synchronous/m-p/277562#M1784</guid>
      <dc:creator>AndresCastillo</dc:creator>
      <dc:date>2019-08-15T12:11:41Z</dc:date>
    </item>
    <item>
      <title>Re: Making request synchronous</title>
      <link>https://community.esri.com/t5/developers-questions/making-request-synchronous/m-p/277563#M1785</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Andres,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;dojo/request/xhr uses XMLHttpRequest.open to&amp;nbsp;perform the request. If 'sync' is true, the promise won't be returned until the request has completed.&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/457338_pastedImage_2.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/457337_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Aug 2019 03:15:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/making-request-synchronous/m-p/277563#M1785</guid>
      <dc:creator>LeoLiu1</dc:creator>
      <dc:date>2019-08-19T03:15:47Z</dc:date>
    </item>
    <item>
      <title>Re: Making request synchronous</title>
      <link>https://community.esri.com/t5/developers-questions/making-request-synchronous/m-p/277564#M1786</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Leo for your replies.&lt;/P&gt;&lt;P&gt;I will have to do a small test on different scenarios of this to see its' effect on the application's behavior.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Aug 2019 12:23:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/making-request-synchronous/m-p/277564#M1786</guid>
      <dc:creator>AndresCastillo</dc:creator>
      <dc:date>2019-08-19T12:23:58Z</dc:date>
    </item>
    <item>
      <title>Re: Making request synchronous</title>
      <link>https://community.esri.com/t5/developers-questions/making-request-synchronous/m-p/277565#M1787</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks worked like a charm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Meghan Kulkarni&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Apr 2020 18:16:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/making-request-synchronous/m-p/277565#M1787</guid>
      <dc:creator>MeghanKulkarni</dc:creator>
      <dc:date>2020-04-13T18:16:09Z</dc:date>
    </item>
  </channel>
</rss>

