| 148 | return target |
| 149 | |
| 150 | def get(self, *path_args, **query_args) -> Response: |
| 151 | parts: list[str] = [self.base_url, *path_args] if self.base_url else path_args |
| 152 | url: str = "/".join([str(a).strip('/') for a in parts]) |
| 153 | req = Request(url, query_args) |
| 154 | resp = self.send(req) |
| 155 | if logger.isEnabledFor(DEBUG): # explicit check because logger call is potentially expensive |
| 156 | logger.debug(f'PyDevlake REST call to GET {resp.get_url_with_query_string()} responded with {resp.status} and {resp.json}') |
| 157 | return resp |
| 158 | |
| 159 | def request_hooks(self): |
| 160 | if not hasattr(self, '_request_hooks'): |