weaver.wps_restapi.utils
¶
Module Contents¶
-
weaver.wps_restapi.utils.
get_wps_restapi_base_url
(container: AnySettingsContainer) → AnyStr[source]¶
-
weaver.wps_restapi.utils.
get_wps_output_format
(request: Request, service_url: AnyStr = None) → AnyStr[source]¶ - Get the preferred output format from WPS after checking various hints:
‘version’ in query string
Content-Type in accept headers
GetCapabilities of the service
- Parameters
request – request for which a response of WPS version-specific format must be generated.
service_url – endpoint URL of the service to request ‘GetCapabilities’ if version not found by previous hints.
- Returns
one of
OUTPUT_FORMAT
(default: 1.0.0 => ‘xml’ if no direct hint matched)