开发者

restful resource's name validation

开发者 https://www.devze.com 2023-02-22 01:01 出处:网络
since i\'m using something like http://mywebsite.web/{nickname}/dostuff i was wondering if there\'s a standard validation for the \"nickname\" string so th开发者_JAVA百科at it won\'t contain reserved

since i'm using something like http://mywebsite.web/{nickname}/dostuff i was wondering if there's a standard validation for the "nickname" string so th开发者_JAVA百科at it won't contain reserved characters and stuff like that


I haven't come across any such functionality in Restlet, but what you could do is to get the value of {nickname} in your resource that is handling that URL, and validate it with a regular expression.

0

精彩评论

暂无评论...
验证码 换一张
取 消