问题描述
我正在尝试从我的 x-www-form-urlencoded 中获取值,但是 MultivaluedMap
@POST
@Path("/submitForm")
@Consumes(MediaType.APPLICATION_FORM_URLENCODED)
@Produces(MediaType.APPLICATION_JSON)
public Response getFormDataUsingMultivaluedMap(@Context HttpServletRequest request,@HeaderParam(ConstantsWebservice.X_API_KEY) String formKey,MultivaluedMap<String,String> formParams) {
for (String key : formParams.keySet()) {
这是我的 CURL:
curl --location --request POST 'http://localhost:8080/service/formintegration/submitForm' \
--header 'X-API-KEY: 123456789' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'test=test'
我目前不知道为什么列表不包括“测试”。
知道出了什么问题吗?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)