function getRequestUrl(baseUrl, extent, size, projection, params) {
  params['WIDTH'] = size[0];
  params['HEIGHT'] = size[1];

  const axisOrientation = projection.getAxisOrientation();
  const v13 = compareVersions(params['VERSION'], '1.3') >= 0;
  params[v13 ? 'CRS' : 'SRS'] = projection.getCode();
  const bbox =
    v13 && axisOrientation.startsWith('ne')
      ? [extent[1], extent[0], extent[3], extent[2]]
      : extent;
  params['BBOX'] = bbox.join(',');

  return appendParams(baseUrl, params);
}
@param {string} baseUrl Base URL.
@param {import("../extent.js").Extent} extent Extent.
@param {import("../size.js").Size} size Size.
@param {import("../proj/Projection.js").default} projection Projection.
@param {Object} params WMS params. Will be modified in place.
@return {string} Request URL.