0
當我執行Guzzle請求時,它第一次使用Laravel,Guzzle和Mailchimp,所以我已經接近咬住我的手指了。我不明白我在做這件事時做錯了什麼。有人能幫助我嗎?Laravel + Guzzle + MailChimp - 400 Bad Request
$mailchimp = new Client(['base_uri' => 'https://us14.api.mailchimp.com/3.0/']);
$checkEmail = $mailchimp->request('POST', 'lists/ID/members/', [
'headers' => [ 'Authorization' => 'apikey ' . config('globals.mailchimp_key') ],
'json' => [
'email_address' => $this->email,
'status' => 'subscribed'
]
]);
return $checkEmail;
不起作用,得到了同樣的結果。當我想要檢索數據時,我的標題工作,所以我認爲這不是問題 –