Select to view content in your preferred language

Changes to the REST API that require URL encoding in the request?

807
0
01-04-2022 03:38 PM
Royce_Simpson
Frequent Contributor

I upgraded my arcgis server implementation from 10.4.1 to 10.9.1 recently and now the geometry service "label points" operation requires the geometry input to be URL encoded?

If you look at this esri doc on the "label points" operation, the example shows the geometry not encoded.  If you try the example you get a 400 error.  If you URL encode that polygon geometry, it works.  Is this a change to the API sometime between 10.4.1 and 10.9.1?  I've had a "label points" call in an app for years that worked just fine without the geometry being encoded, but now after the 10.9.1 upgrade, we've had to revise our code to encode the geometry.  I'm worried I may have other apps that have this change and may be broken now.

labels points doc has this as an example:  

https://sampleserver6.arcgisonline.com/arcgis/rest/services/Utilities/Geometry/GeometryServer/labelP...

which returns a 400 error.

but if you encode the geometry and send the request, it works.

https://sampleserver6.arcgisonline.com/arcgis/rest/services/Utilities/Geometry/GeometryServer/labelP...

 

0 Kudos
0 Replies