check your url / data encoding, which should be json. Also the forwarded data/body should be wrapped in an additional {“inputs”: {JSON_REQUEST}}. The debugger output doesn’t show this.
*args: Any,
raise_for_status: bool = True,
session: requests.Session | None = None,
retry_options: dict[str, Any] = {"maximum_tries": 2, "retry_after": 10},
**kwargs: Any,
) -> T_ApiResponse:
if session is None:
session = requests.Session()
method = kwargs["method"] if "method" in kwargs else args[0]
url = kwargs["url"] if "url" in kwargs else args[1]
inputs = kwargs.get("json", {}).get("inputs", {})
logger.debug(f"{method.upper()} {url} {inputs}")
response = multiurl.robust(session.request, **retry_options)(*args, **kwargs)
logger.debug(f"REPLY {response.text}")
if raise_for_status:
cads_raise_for_status(response)
self = cls(response, headers=kwargs.get("headers", {}), session=session)
self.log_messages()
return self
2 Likes