(
self, verb: str, url: str, responseHeaders: dict[str, Any], data: Any
)
| 868 | return responseHeaders, data |
| 869 | |
| 870 | def __postProcess( |
| 871 | self, verb: str, url: str, responseHeaders: dict[str, Any], data: Any |
| 872 | ) -> tuple[dict[str, Any], Any]: |
| 873 | if verb == "GET" and isinstance(data, dict) and "url" not in data: |
| 874 | if "_links" in data and "self" in data["_links"] and data["_links"]["self"]: |
| 875 | self_link = data["_links"]["self"] |
| 876 | if isinstance(self_link, str): |
| 877 | data["url"] = self_link |
| 878 | elif isinstance(self_link, dict): |
| 879 | href = self_link.get("href") |
| 880 | if href: |
| 881 | data["url"] = href |
| 882 | else: |
| 883 | data["url"] = url |
| 884 | return responseHeaders, data |
| 885 | |
| 886 | @classmethod |
| 887 | def __hostnameHasDomain(cls, hostname: str, domain_or_domains: str | list[str]) -> bool: |
no test coverage detected