0

Ruby, PHP, Node, .NET, all can consume mutipart/formdata's hash format, e.g. (name => value):

user[name] => foo
user[id] => 10
user[account][id] = 10
user[account][status] = true
user[array][0] = 1
user[array][1] = 2

for example in Rails I'd query it like:

params[:user] #=> Hash {name: foo, id: 10}
params[:user][:name] #=> will return 10
params[:user][:array] #=> will return [1,2]

Is same achievable in Java (or maybe there's a library for this)?

EDIT: To explain what I mean by the hash format: link

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
ClassyPimp
  • 715
  • 7
  • 20
  • Could you please explain, or provide any reason, why you need to send hash in form request? – degr Nov 09 '17 at 08:45

1 Answers1

-1

Unfortunately I can't understand your question clearly, but from my opinion:

You should get request body as string, as described here:

Get the POST request body from HttpServletRequest

And then call for md5 or similar function with request string - http://devcolibri.com/4604

degr
  • 1,559
  • 1
  • 19
  • 37