To add some precision:

Even if I add  an 'allowed' parameter by hand:

> request.setParameter('FI_POINT_TOLERANCE','25')

then

> request.parameter('FI_POINT_TOLERANCE')

return an empty string

> Le 10 avr. 2019 à 19:46, David Marteau <dmart...@3liz.com> a écrit :
> 
> 
> Hi devs,
> 
> I found a strange and seemingly inconsistent behavior when accessing 
> QgsServerRequest parameters:
> 
> If you try:
> 
> request.setParameter('FOOBAR','foobar')
> 
> then
> 
> request.parameter('FOOBAR')
> 
> then you get an empty string,
> 
> If you call
> 
> request.parameters() 
> 
> Then your get a dictionary with all the values previously set.
> 
> At first glance it seems that request.setParameter enforce use of a limited 
> set of keys (SERVICE…..
> 
> This does not seem very consistent with the fact parameter() should return 
> any value previously set with setParameter and also the fact that
> request.parameters()  return all previously defined  parameters key/values .
> 
> Furthemore this may be  problematic with plugins that define services in 
> python and thus may define any other set of allowed parameters.
> 
> Should I open an issue ?
> 
> David

_______________________________________________
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to