Skip to main content
Question

HTTPCaller response different to browser response


amber369
Contributor
Forum|alt.badge.img+2

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!

5 replies

j.botterill
Influencer
Forum|alt.badge.img+36
  • Influencer
  • March 25, 2025

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

 


amber369
Contributor
Forum|alt.badge.img+2
  • Author
  • Contributor
  • March 26, 2025

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.


j.botterill
Influencer
Forum|alt.badge.img+36
  • Influencer
  • March 27, 2025

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/


s.jager
Influencer
Forum|alt.badge.img+16
  • Influencer
  • March 27, 2025

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.


amber369
Contributor
Forum|alt.badge.img+2
  • Author
  • Contributor
  • March 31, 2025

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.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings