IRequest.GetPostInt method
获取JSON方式提交的Body中的指定键的值并转换为整数。
public int GetPostInt(string name, int defaultValue = 0)
parameter | description |
---|---|
name | Body中包含的键。 |
defaultValue | Body中不包含键或者键值无法转换为整数时的返回值。 |
Return Value
如果Body中包含指定的键,则返回转换为整数后的的值;否则返回 defaultValue。
See Also
- interface IRequest
- namespace SiteServer.Plugin