I am using javascript to communicate with a third party service. As part of their authentication process they need the \"multipart/form\" body of the post message including
We solved this by manually clearing and re-adding the content type without validation it seems that the MediaTypeHeaderValue() class doesn't like the boundary tags.
instead of using :
content.Headers.ContentType = new MediaTypeHeaderValue("multipart/form-data; boundary=----FLICKR_MIME_20140415120129--");
we did the following:
content.Headers.Remove("Content-Type");
content.Headers.TryAddWithoutValidation("Content-Type", "multipart/form-data; boundary=----FLICKR_MIME_20140415120129--");
Once we made this change it all worked correctly.
(Note that this is on WinRT if that makes any difference)