c# - HTTP request with POST - data will not be displayed -


i'm trying post data php page using c#.

i tried msdn example (i changed postdata "xml=test") , tried example of this post.

the php page simple. contains:

<?php echo "postdata<br>"; echo "<pre>"; print_r($_post); echo "</pre>"; ?> 

i wrote simple html file testing. contained form post data.

<html> <body> <form action = "https://myurl/upload/uploadtest.php" method = "post"> <input name = "xml" value="test"><p> <input type = "submit" value="absenden"> </form> </body> </html> 

the response of html site is:

postdata array (     [xml] => test ) 

this means me connection , php file ok.

but response of c# code is:

ok  postdata<pre>array ( ) </pre> 

the "ok" comes "(((httpwebresponse)response).statusdescription)" , rest "reader.readtoend()".

can tell me why html file works , c# not?
, how can c# upload working?


Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -