def _get_name_from_url(self, request):
        """ Determine short name for the mapper based on the URL.

        Short name can be either in query string (e.g. ?format=json)
        or as an extension to the URL (e.g. myresource.json).

        :returns: short name of the mapper or ``None`` if not found.
        """

        format = request.GET.get('format', None)
        if not format:
            match = self._format_query_pattern.match(request.path)
            if match and match.group('format'):
                format = match.group('format')
        return format