我正在开发我的WooCommerce商店的Android应用程序,我正在使用GET http动词WooCommerce REST Api获取产品,类别,订单,客户等商店数据.它工作正常,我能够正确地为api V2和V3 生成oAuth 1.0签名.现在,我想执行Write动作.我从相同的文档中学到了我需要使用POST Http动词.我尝试了同样的卡住.
当我使用URL,oAuth数据和生成的签名使用HttpGet或HttpPost请求执行任何POST操作时,我得到:
{"errors":[{"code":"woocommerce_api_authentication_error","message":"Invalid Signature - provided signature does not match"}]}
Run Code Online (Sandbox Code Playgroud)
我遵循文档中给出的所有说明并在Google上找到,使用"POST"字符串生成oAuth签名,尝试使用HttpGet和HttpPost发送params但失败了.
任何人都可以请给我一些说明或示例,使用Android的POST Http动词来使用WooCommerce REST API执行写操作.(比如创建新订单,创建新类别等)