We help IT Professionals succeed at work.
Get Started

Cannot send a content-body with this verb-type error

Last Modified: 2012-05-08
I am trying to get some data from a website.  

The url is of the form:  http://domain/subfolder?parameter1=value1¶m2=value2...

I can copy the url and paste it in a new explorer window and it will bring back the data that I want.  When I watch this in fiddler, the request is sent as a GET.

I created a C# app to automate this.  I created a webrequest object and pasted the full url (with parameters) in as the url.  I tried running it and I got an error (500).  I tried just the url (without the parameters) and it works fine.

I tried to append the parameters into the request stream using a stream writer, but I get the error "Cannot send a content-body with this verb-type error."  

This generally comes up when the request should be sent as a POST.  I did try this, and received error.  I went back to pasting the url into explorer and watching fiddler, it was sent as a get.

Watch Question
Top Expert 2009
This problem has been solved!
Unlock 1 Answer and 6 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE