laptop and a wrench

Bug

Web Map Service (WMS) GetMap requests are sent as POST with an invalid encoded body when the GetMap requests' URL exceeds the configured maxUrlLength of @arcgis/core/config.

Last Published: May 8, 2022 ArcGIS API for JavaScript
Bug ID Number BUG-000147618
SubmittedMarch 15, 2022
Last ModifiedJune 5, 2024
Applies toArcGIS API for JavaScript
Version found4.22
Operating SystemWindows OS
Operating System Version10.0 64 Bit
StatusWill Not Be Addressed

Additional Information

The Web Map Service (WMS) spec never standardized XML encoding for the post body, so GetMap requests as XML is not supported when sent as POST since the XML may be different for each server. Regarding always sending GetMap requests as GET, we decided against that as well, since we do not want to break existing layers where the server responds correctly. As an alternative, this request interceptor always makes a GET request: esriConfig.request.interceptors.push({ urls: "https://host/path", async before(params) { if (params.requestOptions.responseType === "image") { const url = new URL(params.url); url.search = new URLSearchParams([ ...Array.from(url.searchParams.entries()), ...Object.entries(params.requestOptions.query || {}) ]).toString(); const img = new Image() img.crossOrigin = "anonymous"; img.src = url.href; await img.decode() return img; } } });

Steps to Reproduce

Bug ID: BUG-000147618

Software:

  • ArcGIS API for JavaScript

Get notified when the status of a bug changes

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options