Hi
I am integrating an app with a service (iContact), that describes its API as "rest-like". I post XML, and everything works fine... Until I send special characters like æøå - then I get a "bad request" error from the server.
<contacts>
<contact>
<firstname>Søren</firstname>
<lastname>ÆbleTårn</lastname>
</contact>
</contact>
I tried putting firstname and lastname values in cdata, but that did not help.
Is there some encoding I can apply to values (similar to html-encode), or do I need to move in another direction?
I doubt the problem is specific to .Net, but the answer might be, so here is the code I use:
Dim xml as string = GenerateXml()
Dim http As New HttpClient("http://uri.to/rest")
Dim resp As HttpResponseMessage = http.Post(String.Empty, HttpContent.Create(xml))