Version 5.1 - All the GraphQL #32
@ -14,8 +14,10 @@
|
|||||||
|
|
||||||
namespace Aviat\AnimeClient\API;
|
namespace Aviat\AnimeClient\API;
|
||||||
|
|
||||||
|
// use Amp\Http\Client\Form;
|
||||||
use Amp\Http\Client\Body\FormBody;
|
use Amp\Http\Client\Body\FormBody;
|
||||||
|
use Amp\Http\Client\HttpClientBuilder;
|
||||||
|
use Amp\Http\Client\HttpException;
|
||||||
use Amp\Http\Client\Request;
|
use Amp\Http\Client\Request;
|
||||||
use Aviat\Ion\Json;
|
use Aviat\Ion\Json;
|
||||||
|
|
||||||
@ -203,9 +205,7 @@ abstract class APIRequestBuilder
|
|||||||
{
|
{
|
||||||
$this->buildUri();
|
$this->buildUri();
|
||||||
|
|
||||||
if ($this->logger !== NULL)
|
$this->logger?->debug('API Request', [
|
||||||
{
|
|
||||||
$this->logger->debug('API Request', [
|
|
||||||
'request_url' => $this->request->getUri(),
|
'request_url' => $this->request->getUri(),
|
||||||
'request_headers' => $this->request->getHeaders(),
|
'request_headers' => $this->request->getHeaders(),
|
||||||
'request_body' => wait(
|
'request_body' => wait(
|
||||||
@ -214,7 +214,6 @@ abstract class APIRequestBuilder
|
|||||||
->read()
|
->read()
|
||||||
),
|
),
|
||||||
]);
|
]);
|
||||||
}
|
|
||||||
|
|
||||||
return $this->request;
|
return $this->request;
|
||||||
}
|
}
|
||||||
@ -222,12 +221,11 @@ abstract class APIRequestBuilder
|
|||||||
/**
|
/**
|
||||||
* Get the data from the response of the passed request
|
* Get the data from the response of the passed request
|
||||||
*
|
*
|
||||||
* @throws Error
|
* @param Request $request
|
||||||
* @throws Throwable
|
|
||||||
* @throws TypeError
|
|
||||||
* @return mixed
|
* @return mixed
|
||||||
|
* @throws Throwable
|
||||||
*/
|
*/
|
||||||
public function getResponseData(Request $request)
|
public function getResponseData(Request $request): mixed
|
||||||
{
|
{
|
||||||
$response = getResponse($request);
|
$response = getResponse($request);
|
||||||
|
|
||||||
|
@ -2122,7 +2122,7 @@ abstract class Stringy implements Countable, IteratorAggregate, ArrayAccess
|
|||||||
* Alias for mb_regex_encoding which default to a noop if the mbstring
|
* Alias for mb_regex_encoding which default to a noop if the mbstring
|
||||||
* module is not installed.
|
* module is not installed.
|
||||||
*/
|
*/
|
||||||
protected function regexEncoding(): mixed
|
protected function regexEncoding(): string|bool|null
|
||||||
{
|
{
|
||||||
static $functionExists;
|
static $functionExists;
|
||||||
|
|
||||||
@ -2137,6 +2137,8 @@ abstract class Stringy implements Countable, IteratorAggregate, ArrayAccess
|
|||||||
|
|
||||||
return mb_regex_encoding(...$args);
|
return mb_regex_encoding(...$args);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function supportsEncoding(): bool|null
|
protected function supportsEncoding(): bool|null
|
||||||
|
Loading…
Reference in New Issue
Block a user