If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Spring.Rest - how to post with url encoding instead of multi-part

I am trying to do a PostForMessageAsync with either a dictionary or newtonsoft json object (though I don't really care what I use) of values to a server, and send them URLENCODED (C# Winforms, btw). First, the default behavior is multipart, so I can't just take the easy path, and call the post with a url and a dictionary, I have to start building HttpHeaders and HttpEntities. The first problem is the docs refer to HttpEntity as a typed class, i.e. HttpEntity<T>, which it is not. Oh, but perhaps that's because the only docs on the class are for Java. But I digress . . .

To start, I create a rest template and add several format converters, including NJsonHttpMessageConverter. In my server call function, I can do the following:

This call fails, with the dreaded "no converter available" (actual error text: "Could not write request: no suitable IHttpMessageConverter found for request type [Newtonsoft.Json.Linq.JObject] and content type [application/x-www-form-urlencoded]"). What? I guess that's better than just ignoring the content type when it's a dictionary. For kicks and giggles, I tried a third round, changing the MediaType in the header to APPLICATION_JSON. It also worked, but of course, the server had no clue how to handle straight up json.

What's the path to get my data to the server in a URLENCODED format? Spring claims to make REST easy . . .