How do I read POST parameters for a RESTful service using Jersey?(如何使用 Jersey 读取 RESTful 服务的 POST 参数?)
问题描述
我没有使用 JSON 或类似的东西.我有一个简单的表单来上传文件,我想读取表单的参数.下面的代码没有按预期工作.它不会显示任何参数.
I am not using JSON or anything like that. I have a simple form to upload a file and I want to read the parameters of the form. The code below is not working as expected. It will not show any parameters.
推荐答案
仅供参考,您需要使用@FormParam.还要确保 INPUT HTML 类型使用 name= 而不是 id=.
FYI, You need to use @FormParam. Also make sure INPUT HTML types are using name= not id=.
这篇关于如何使用 Jersey 读取 RESTful 服务的 POST 参数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!