:mod:`weaver.wps_restapi.utils` =============================== .. py:module:: weaver.wps_restapi.utils Module Contents --------------- .. data:: LOGGER .. data:: WPS_VERSION_100 :annotation: = 1.0.0 .. data:: WPS_VERSION_200 :annotation: = 2.0.0 .. data:: OUTPUT_FORMAT_JSON :annotation: = json .. data:: OUTPUT_FORMAT_XML :annotation: = xml .. data:: OUTPUT_FORMATS .. function:: wps_restapi_base_path(container) -> AnyStr .. function:: get_wps_restapi_base_url(container) -> AnyStr .. function:: get_wps_output_format(request, service_url=None) -> AnyStr Get the preferred output format from WPS after checking various hints: - 'version' in query string - Content-Type in accept headers - GetCapabilities of the service :param request: request for which a response of WPS version-specific format must be generated. :param service_url: endpoint URL of the service to request 'GetCapabilities' if version not found by previous hints. :return: one of ``OUTPUT_FORMAT`` (default: 1.0.0 => 'xml' if no direct hint matched)