有没有简单的小程序 url 生成器?
我想从数组转换为 URL 的获取参数。 我知道apache的HTTPClient,但是它对于applet来说太大了。
有简单的解决方案吗?
我的小程序中有一个列表(或数组),我想为 HttpRequest 编写 URL 参数。 ParameterFormatter 很好,但是 jar 文件对于 applet 来说太大了。
编辑: 我发现有 Java Optimizer/Shrinker/Reducer 工具可以让你优化 jar。例如混淆者
I want to convert from array into get-parameters of URL.
I know HTTPClient of apache, but it's too large for applet.
is there simple solution?
I have a List(or array) in my applet, and I want to write URL-parameters for HttpRequest.
ParameterFormatter is good, but the jar file is too large for applet.
edit:
I found there is Java Optimizer/Shrinker/Reducer tool allows you to optimize jar. eg proguard
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以简单地自己开发一个,因为您只需将它们连接到一个查询字符串。我正在对您想要的进行一些假设(例如每个变量的键以 var 开头),但这里是:
当然您可以对代码进行其他简单的实现和优化。也可能有一些 Java 类已经执行此操作,但似乎您必须 自己构建或使用 Apache Commons 3rd party 库(我知道你不能)。
You could simply develop one yourself as you only need to join them together to a query string. I'm doing some assumptions on what you want (such as the key for each variable starts with
var
) but here goes:There are of course other naïve implementations and optimizations to the code that you can do. There also might be some Java class that does this already, but it seems that you have to build it on your own or use the Apache Commons 3rd party library (which I understand you can't).