fix: use asJson() on TikTok HTTP client to send proper JSON body
This commit is contained in:
parent
cb91529964
commit
326648d4f9
2 changed files with 2 additions and 8 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue