Skip to main content

Hi All,

 

I've replicated a print call to a public mapping application using HTTPCaller. I've done this to try to capture some metrics on intermittent print errors we are seeing.

However, complicating this, the response body results URL (from which the pdf would be retrievable) is formatted slightly differently between the  HTTPCaller and the browser Dev Tools response. 

For example:

In the browser I see: "url": "https://utility.arcgisonline.com/arcgis/rest/directories/arcgisoutput/Utilities/PrintingTools_GPServer/x_____xW6zDASkYrE9-8aNcJmscBA..x_____x_ags_e458af6a-0932-11f0-acf5-0e5ef779a06f.pdf"

However in the HTTPCaller response I get: "url": "https://utility.arcgisonline.com/arcgis/rest/directories/arcgisoutput/Utilities/PrintingTools_GPServer/_ags_10f9db8b-0934-11f0-84d5-0afff93c372b.pdf"

What would be the explanation for this difference?

Thank you!

A little more details on the HTTPCaller would help. I assume you are using a GET… or is it a POST HTTP Method? You likely need to jump down to the Response handling and save response body to a file that you have control over naming.

Response as a file output

 


Thanks for responding.

Im using a POST method. Im using the Attribute Response body so that i can parse out the URL from the response and then access the PDF via another HTTPCaller (GET method). Within the second HTTPCaller i have set the Response Body to File to download the PDF.


Is there something in Esri documentation, given its ArcGIS online in AWS I can only assume it creates unique filename / paths each and every geoprocessing task https://utility.arcgisonline.com/arcgis/help/en/rest/services-reference/enterprise/export-web-map-task/

https://utility.arcgisonline.com/arcgis/help/en/rest/services-reference/enterprise/exportwebmap-specification/


As j.botterill says: it could be a unique filename generated per request, but I have also seen servers respond differently based on the User Agent. There are services that wrap html around their response if they see that the request is coming from a browser for example. So you might want to try and play with the user agent that the HTPPCaller is using, see if that makes a difference.


Thanks to both of you for your responses.

I've added the info from the User-Agent request header in the Header table in the HTTPCaller (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36) but unfortunately with no success. I then added all of the remaining request headers (except for content-length as this caused an error), again with no success.

Ill float this question to Esri and provide any useful updates here.


Reply