Hello,
There seems to be at least a typing error in the geoprocessor rest.
When I submit an async geoprocess like below:
const jobSubmitted = await submitJob(url, params);
If I want to fetch I need to use fetchResultData.
fetchResultData(jobId: string, resultName: string, requestOptions?: any, Promise<supportParameterValue>;
Then if I do
const output = await jobSubmitted.fetchResultData(jobId, resultName);
It returns an error. In the network tab you can see it queries the wrong URL :
https://{url}/jobs/j28ccad931fd54ea4aa35bb2a5d525bc8/results/j28ccad931fd54ea4aa35bb2a5d525bc8?f=json
It actually uses the jobId twice.
For the moment my workaround is to ignore the typing, and only pass the resultName
const output = await (jobSubmitted as any).fetchResultData(resultName);
Which calls the correct endpoint..