def get_info(self, query): if self.supported_srs and query.srs not in self.supported_srs: query = self._get_transformed_query(query) resp = self._retrieve(query) info_format = resp.headers.get('Content-type', None) if not info_format: info_format = query.info_format return create_featureinfo_doc(resp.read(), info_format)
def get_info(self, query): if self.supported_srs and query.srs not in self.supported_srs: query = self._get_transformed_query(query) resp = self._retrieve(query) # use from template if available info_format = self.request_template.params.get('info_format') if not info_format: # otherwise from response info_format = resp.headers.get('Content-type', None) if not info_format: # otherwise from query info_format = query.info_format return create_featureinfo_doc(resp.read(), info_format)
def get_info(self, query): if self.supported_srs and query.srs not in self.supported_srs: query = self._get_transformed_query(query) resp = self._retrieve(query) # always use query.info_format and not content-type from response (even esri example server aleays return text/plain) return create_featureinfo_doc(resp.read(), query.info_format)