Rules of engagement when you use an ESRI REST service

136
0
06-30-2019 09:38 PM
JohnCuthbertson
New Contributor II

I am trying to determine the rules of engagement when you use an ESRI REST service

I issue the following request

rest/services/Utilities/Geometry/GeometryServer/simplify?sr=4283&geometries=%7b%22geometryType%22%3a%22esriGeometryPolygon%22%2c%22geometries%22%3a%5b%7b%22rings%22%3a%5b%5b%5b123.83226587344406%2c-28.061656435295191%5d%2c%5b123.83226587344406%2c-28.008807755308091%5d%2c%5b123.88049895044182%2c-28.008807755308091%5d%2c%5b123.88049895044182%2c-28.061656435295191%5d%2c%5b123.83226587344406%2c-28.061656435295191%5d%5d%5d%7d%5d%7d&f=json"

 

It normally returns statuscode of 200 and a json string containing a polygon

every now and again (perhaps 1 in a 1000, 1 in 1000000) it returns the following

HTTP/1.1 200 OK Strict-Transport-Security: max-age=31536000;includeSubDomains Vary: Accept-Encoding Cache-Control: private,no-store,no-cache Content-Type: text/html; charset=utf-8 Date: Sun, 30 Jun 2019 11:00:21 GMT Server: Microsoft-IIS/10.0 X-AspNet-Version: 4.0.30319 X-Powered-By: ASP.NET Set-Cookie: ZNPCQ003-32383000=6f2aa75d; Path=/; Domain=.dmp.wa.gov.au; HttpOnly Via: 1.1 gissdi.dmp.wa.gov.au (Access Gateway-ag-683BD5D4662193FD-9926260) Content-Length: 7293

ArcGIS Web Adaptor

Could not access any server machines. Please contact your system administrator.

 

Leaving aside the obvious error that has occurred somewhere between the ArcGIS WebAdapter and the server machine. (although any clues would be appreciated!)

  • Is it valid to return a status code of 200 and not honour the f=json
  • Or is it OK to return status code of 200 and override the format with ‘Content-Type: text/html’

The answers to these questions go the heart of how code should check the response from a REST call

My expectation was that a code of 200 says that the request has been accepted and processed and that the result of that processing (including possible errors) is contained in a json construct.

0 Kudos
0 Replies