fix: use asJson() on TikTok HTTP client to send proper JSON body

This commit is contained in:
Paulo Castellano 2026-04-02 18:14:32 -03:00
parent cb91529964
commit 326648d4f9
2 changed files with 2 additions and 8 deletions

View file

@ -152,10 +152,7 @@ private function fetchVideoMetrics(): array
private function getHttpClient(): PendingRequest
{
return $this->socialHttp()->withToken($this->accessToken)
->withHeaders([
'Content-Type' => 'application/json; charset=UTF-8',
]);
return $this->socialHttp()->asJson()->withToken($this->accessToken);
}
private function refreshToken(SocialAccount $account): void

View file

@ -60,10 +60,7 @@ public function publish(PostPlatform $postPlatform): array
private function getHttpClient(): PendingRequest
{
return $this->socialHttp()->withToken($this->accessToken)
->withHeaders([
'Content-Type' => 'application/json; charset=UTF-8',
]);
return $this->socialHttp()->asJson()->withToken($this->accessToken);
}
private function queryCreatorInfo(): array