How to post URL-encoded form via Wink Client?

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

How to post URL-encoded form via Wink Client?

Adam Kaplan
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

Reply | Threaded
Open this post in threaded view
|

Re: How to post URL-encoded form via Wink Client?

freshie
This post has NOT been accepted by the mailing list yet.
Reply | Threaded
Open this post in threaded view
|

Re: How to post URL-encoded form via Wink Client?

freshie
This post has NOT been accepted by the mailing list yet.
This post was updated on .
In reply to this post by Adam Kaplan
Reply | Threaded
Open this post in threaded view
|

Re: How to post URL-encoded form via Wink Client?

freshie
This post has NOT been accepted by the mailing list yet.
In reply to this post by Adam Kaplan
Reply | Threaded
Open this post in threaded view
|

Re: How to post URL-encoded form via Wink Client?

freshie
This post has NOT been accepted by the mailing list yet.
In reply to this post by freshie
Reply | Threaded
Open this post in threaded view
|

Re: How to post URL-encoded form via Wink Client?

freshie
This post has NOT been accepted by the mailing list yet.
In reply to this post by Adam Kaplan