如何从 Apache HTTPClient 中的 HTTPRequest 获取 url 参数值
我想获取查询字符串中特定参数的值。 HttpClient 中是否有任何方法可以为我做(例如 util 类方法)或者我必须编写自己的方法?
I would like to take value of specific parameter in query string. Is there any method in HttpClient which can do if for me (ex. util class method) or I have to write my own?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在4.XX中有:
然后处理你自己的参数。
In 4.X.X there is:
Then handle your own parameter.
在 Apache Http Client 5.xx 中,
URLEncodedUtils
已弃用。您可以使用:默认情况下使用 UTF8 解码。
In Apache Http Client 5.x.x
URLEncodedUtils
is deprecated. You can use:This uses UTF8 decoding by default.