IRequest.GetPostDecimal method

获取JSON方式提交的Body中的指定键的值并转换为小数。

  1. public decimal GetPostDecimal(string name, decimal defaultValue = 0)
parameter description
name Body中包含的键。
defaultValue Body中不包含键或者键值无法转换为小数时的返回值。

Return Value

如果Body中包含指定的键,则返回转换为小数后的的值;否则返回 defaultValue。

See Also