在我传递的特征文件和形式field grant_type = 'client_credentials'
和形式字段scope = '/api'
在发布方法后,它在请求消息中反映为grant_type=client_credentials&scope=**%2Fapi**
预计为
grant_type=client_credentials&scope=**/api**
任何人都可以帮助解决这个问题如何在value ='/api'
的特征文件中传递表单字段范围?
空手道正在做正确的事情,它是对参数进行URL编码。也许你打算做* method post
- 那么你就不会在URL中看到它而感到困惑。
如果您的服务器端无法处理scope=**%2Fapi**
,则可能是您服务器中的错误。
编辑:正如所发现的那样,问题是使用了很老版的空手道:How to resolve the HeaderValueException for the post method API call with content type = 'application/x-www-form-urlencoded'?