Raw HTTP POST using C# .Net? Is there such a thing as a POST w/o fields? (Convert Perl to .Net)

Background: In the past when I've done a HTTP POST, it's always been in a web form submit scenario.  I have experience adding name/value pairs to NameValueCollection and passing that to the .Net library class WebClient.UploadValues.  Voila.

Current problem: I'm currently required to POST some XML but apparently there are no fields. I'm guessing this is a "raw" HTTP Post? I guess I haven't encountered this before.

Question: What does this mean?  Is there such a thing as a "raw" HTML Post w/o form fields? I have some example Perl code below that does it (attached).

How do I pull off a raw HTTP POST using C# .Net?  Do I use UploadData(string address, byte[] data) ???
my $ua = new LWP::UserAgent;

$ua->agent("post.pl/1.0 " . $ua->agent);

my $request = new HTTP::Request POST => $url;

$request->push_header("FileType", "SomeThing");

my $results = $ua->request($request);

Open in new window

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
in above link, ignore "parameters", set your content type and then write xml into request stream
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Languages and Standards

From novice to tech pro — start learning today.