看着
the current version of the WADL proposal
,我不太明白如何记录Post请求参数(使用
application/x-www-form-urlencoded
编码)。
我在野外见过这样的东西:
<resource path="/path1">
<!-- default is mediaType="application/x-www-form-urlencoded" -->
<method name="POST">
<request>
<name="param1" style="query"/>
</request>
</method>
</resource>
然而,对于
<param style="query">
用作
<request>
,
the spec describes it as
:
指定一个
URI查询
参数
根据规则代表
查询组件媒体类型
由querytype属性指定。
“uri query”位让我很不高兴,因为对我来说,它建议将参数附加到uri,而不是包含在主体中。
另一方面,对于
<param style=“查询”>
用作
<representation>
,规格有:
指定的组件
表示为名称-值对
按照以下规则格式化
媒体类型。通常用于
媒体类型
'application/x-www-form-urlencoded'或
“多部分/表单数据”。
我必须使用
<代表性>
元素来显式地记录将以编码方式作为日志正文的一部分发送的参数?
<resource path="/path1">
<method name="POST">
<request>
<representation mediaType="application/x-www-form-urlencoded">
<name="param1" style="query"/>
</representation>
</request>
</method>
</resource>
这看起来太过分了。我假设我应该能够使用前者,即使规范提到了“uri查询”。