HTTP POST does not work on WinRT

Dec 22, 2012 at 10:11 AM

Hey there,

I just noticed that your example for doing a HTTP post does not work on WinRT.. Maybe there is another way to do it ??

From your example:

request.Files.Add(new HttpPostFile("name", "file.jpg", "path/to/file.jpg")); // POST files

First off, this cant be done under WinRT as you require a stream instead of the directory name. Thus the above call will not compile...

Secondly if I change it to the correct call it then fails on the write post as you cannot set a Directory, and an exception of cannot be null is thrown....

If there is another way to make this work then it would be great if you could let me know... :)

Or if you would like me to help beta test this then I would be more than happy... :)

Dec 22, 2012 at 10:16 AM

oh wait.... sorry my fault.... I was passing in a null stream, and hence it then looked for a path ......

Coordinator
Dec 22, 2012 at 1:40 PM

Hi. Is it working now? I have changed the third parameter to StorageFile (in WinRT). Of course the stream version still works.. Can you can test if the StorageFile version works for you?

Dec 29, 2012 at 9:10 AM
hey thanks for the reply... yes I will test it out for you... :)

Gerard.



From: [email removed]
To: [email removed]
Date: Sat, 22 Dec 2012 06:40:38 -0800
Subject: Re: HTTP POST does not work on WinRT [mytoolkit:415204]

From: rsuter
Hi. Is it working now? I have changed the third parameter to StorageFile (in WinRT). Of course the stream version still works.. Can you can test if the StorageFile version works for you?
Read the full discussion online.
To add a post to this discussion, reply to this email (mytoolkit@discussions.codeplex.com)
To start a new discussion for this project, email mytoolkit@discussions.codeplex.com
You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.
Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com