0
我正在使用PHP和Google_Client發送HTTP請求來添加谷歌用戶和組,並且這些工作都正常。我無法弄清楚如何讓我的刪除請求正常工作。我收到400錯誤,我認爲這意味着我的請求的語法不好。 PHP請求在下面...我想從組中刪除一個成員。Google API PHP DELETE請求無法正常工作
$requestUrl = 'https://www.googleapis.com/admin/directory/v1/groups/*groupName*/members/*memberName*';
$requestMethod = 'DELETE';
$requestHeader = array('Content-Type' => 'application/json', 'Content-Length' => 'CONTENT_LENGTH');
$postBody ='';
$request = new Google_Http_Request($requestUrl , $requestMethod, $requestHeader, $postBody);