__all__ = ['RequestParamMixin']

class RequestParamMixin:
    """Resolve a named parameter from the query string, falling back to the request body."""

    def _get_param(self, name: str) -> str | None:
        value = self.request.query_params.get(name)
        if not value:
            value = self.request.data.get(name)
        return value or None
