<?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: Issue with rest/geoprocessor typescript 4.20 in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/issue-with-rest-geoprocessor-typescript-4-20/m-p/1080424#M73935</link>
    <description>&lt;P&gt;Yeah, this was an error in the doc and typings. Your workaround is correct. The doc will be updated in a couple of weeks. If there are enough typings updates, we'll do an update for npm, unsure at the moment.&lt;/P&gt;</description>
    <pubDate>Mon, 19 Jul 2021 18:39:35 GMT</pubDate>
    <dc:creator>ReneRubalcava</dc:creator>
    <dc:date>2021-07-19T18:39:35Z</dc:date>
    <item>
      <title>Issue with rest/geoprocessor typescript 4.20</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/issue-with-rest-geoprocessor-typescript-4-20/m-p/1080422#M73934</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;There seems to be at least a typing error in the geoprocessor rest.&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mtk1"&gt;When I submit an async geoprocess like below:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const jobSubmitted = await submitJob(url, params);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN class="mtk1"&gt;If I want to fetch I need to use&amp;nbsp;fetchResultData.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;fetchResultData(jobId: string, resultName: string, requestOptions?: any, Promise&amp;lt;supportParameterValue&amp;gt;;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN class="mtk1"&gt;Then if I do&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const output = await jobSubmitted.fetchResultData(jobId, resultName);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;SPAN&gt;It returns an error. In the network tab you can see it queries the wrong URL :&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;https://{url}/jobs/j28ccad931fd54ea4aa35bb2a5d525bc8/results/j28ccad931fd54ea4aa35bb2a5d525bc8?f=json&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;It actually uses the jobId twice.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;For the moment my workaround is to ignore the typing, and only pass the resultName&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const output = await (jobSubmitted as any).fetchResultData(resultName);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;SPAN&gt;Which calls the correct endpoint..&lt;/SPAN&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 19 Jul 2021 18:39:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/issue-with-rest-geoprocessor-typescript-4-20/m-p/1080422#M73934</guid>
      <dc:creator>MatthieuThery1</dc:creator>
      <dc:date>2021-07-19T18:39:19Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with rest/geoprocessor typescript 4.20</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/issue-with-rest-geoprocessor-typescript-4-20/m-p/1080424#M73935</link>
      <description>&lt;P&gt;Yeah, this was an error in the doc and typings. Your workaround is correct. The doc will be updated in a couple of weeks. If there are enough typings updates, we'll do an update for npm, unsure at the moment.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Jul 2021 18:39:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/issue-with-rest-geoprocessor-typescript-4-20/m-p/1080424#M73935</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2021-07-19T18:39:35Z</dc:date>
    </item>
  </channel>
</rss>

