POST多个参数 [英] POST multiple parameters

查看:117
本文介绍了POST多个参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将GET更改为POST。目前我有.jsp?id = a,b,c,d。当改变这个帖子,我仍然坐在ID参数a,b,c,d。这不适合我。我可以提交一个逗号分隔的列表到一个post参数吗?

解决方案

我是错的还是大部分答案都在旁边?

要回答您的问题,是的,您可以将逗号分隔列表提交给POST参数。说实话,我只是做了一个PHP脚本的快速尝试,但我不明白为什么Java会有不同的表现。 POST请求的一点恰恰就是你对语法的约束要少得多(不需要escape =&或者这样)。

所以如果你更详细地解释什么不起作用,也许我们可以帮助你更多。


I am changing a GET to a POST. Currently I have .jsp?id=a,b,c,d. When changing this to a post I am still sitting the id parameter a,b,c,d . This is not working for me. Can I submit a comma separated list to a post parameter?

解决方案

Am I wrong or most of the answers are beside the point?

To answer precisely your question, yes, you can submit a comma separated list to a POST parameter. To be honest, I just did a quick try with a PHP script, but I don't see why Java would behave differently. One point with POST requests is precisely that you have much less constraints on syntax (no need to escape = & or such).

So if you explain more in details what "doesn't work", perhaps we can help you more.

这篇关于POST多个参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆