[英]Acumatica Using $filter programmatically gives HTTP 400 Bad request
我在我的 php 代碼中使用這個 url
https://awesomedomain.app/entity/Default/18.200.001/SalesOrder?$filter=Status eq 'Completed'
像這樣:
$acumaticaOrder = $this->Acumatica_API("/entity/Default/18.200.001/SalesOrder?$" . 'filter' . "=Status eq 'Completed'", 'GET');
但它給出了“錯誤請求”錯誤
然而,我在Postman中使用相同的鏈接,但它給了我那些標記為已完成的訂單。
我什至檢查了我正在制作的 URL 並在 Postman 中復制粘貼相同的URL ,在Z46F061E1CAD5E2783CEA0B2976ED2F4C3Z中,它在 Z46F061E27CEZAED2 中有效但是以編程方式它給出了 HTTP 400 Bad request。
你的字符串應該是這樣的結構:
$url = 'http://localhost/Acumatica20R2DB/entity/Default/20.200.001/SalesOrder?$filter=Status%20eq%20%27Completed%27';
單引號將有 PHP 忽略您的 $ 並且您需要對過濾器中的空格和 ' 使用 html 編碼。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.