You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@wink.apache.org by Adam Kaplan <ak...@princeton.com> on 2015/04/23 21:47:58 UTC
How to post URL-encoded form via Wink Client?
My team is migrating from the Jersey 1.x client to Wink 1.1.1 (provided by
WebSphere v8.0.0.9)
Our old code used Jersey's Form, like so:
WebResource resource = client.resource("http://mysite.com/rest/");
Form toPost = new Form();
toPost.add("foo", "bar");
toPost.add("baz", true);
ClientResponse response =
resource.accept(MediaType.TEXT_PLAIN).post(toPost,
MediaType.APPLICATION_FORM_URLENCODED);
Is there an equivalent means to do this via Wink? Will post-ing a
Map<String, String> do the trick?
Thank You,
Adam
--
Adam Kaplan
Senior Consultant
Princeton Consultants, Inc.
590 5th Avenue, 16th Floor
New York, NY 10036
212.575.2626 x313