-
-
Notifications
You must be signed in to change notification settings - Fork 113
Open
Description
https://docs.saloon.dev/the-basics/responses#custom-responses
When you need a more advanced way to define a custom response, use the resolveResponseClass method on either the connector or request.
But i can't select response class with depend of response data, like in
https://docs.saloon.dev/the-basics/handling-failures#customising-when-saloon-thinks-a-request-has-failed
Так как этот метод не имеет доступа к response
public function getResponseClass(): string
{
$response = $this->request->resolveResponseClass() ?? $this->connector->resolveResponseClass() ?? Response::class;
if (! class_exists($response) || ! Helpers::isSubclassOf($response, Response::class)) {
throw new InvalidResponseClassException;
}
return $response;
}
Metadata
Metadata
Assignees
Labels
No labels