users@jersey.java.net

[Jersey] POST using jersey client

From: NS <nssv12_at_gmail.com>
Date: Wed, 18 May 2011 14:35:18 -0700

Hi,

I am trying to use Jersey client for the first time. I have browsed through
several tutorials, but couldn't get the following POST request working :

I am trying to execute the following POST request through Jersey Client -

curl -b cookies -c cookies -X POST --data-binary @cred 'url'

the cred file contains username and password info in the following format

"auth":
  {
    "username" : "user",
    "password" : "passwd"
  }
}

I tried to use MultivaluedMap to set username and password, but it doesn't
work

Could you point me to an example to implement my request.

Thanks a bunch!