我試圖使用ZF1其餘客戶與Zend_Rest_Client
$this->restClient = new Zend_Rest_Client('https://myurl.com');
$response = $this->restClient->delete('/service/'.$this->uuid.'.json?api_key='.$this->apikey);
刪除資源刪除,但我得到一個錯誤:
Path "/service/v-2149d050-c64b-0131-33b0-1231390c0c78.json?api_key=a-9a136a00-b340-0131-2662-1231390c0c78" is not a valid HTTP path
網絡服務文檔簡單的說就是用
DELETE https://myurl.com/service/YOUR_UUID.json?api_key=YOUR_API_KEY
關於如何使用這個類的任何想法?
感謝
「'?'」是HTTP URI中的保留字符,如果要在URI的路徑中使用它,則需要對其進行百分比編碼。在你的代碼中你有*沒有*編碼它。 – hakre