use*_*997 5 java rest android web-services
我必须将UserName
和password
作为参数传递给GET
方法进行验证。处理后我需要得到响应。那么如何将值传递给RESTful
webserviceGET
方法?
要在 HTTP GET 中传递参数,您应该使用?
分隔符。例如
https://mywebsite.com/user/login?username=bob&password=123
https://mywebsite.com/user/login?paramname1=value1¶mname2=value2
Run Code Online (Sandbox Code Playgroud)
确保始终https
与任何敏感数据一起使用。您可能还需要对用户名和密码进行转义/编码以允许扩展 ASCII。如果您需要支持 UNICODE,您应该考虑使用 POST 请求。