0

I want to implement a SOAP request using C# HttpWebrequest.

I am stock at customizing the initial line. Is there a simple solution or a work around?

HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
request.Method = "POST /_urn:upnp-org:serviceId:ContentDirectory_control HTTP/1.1";

I want the initial Header line received by the Server to look like

POST /_urn:upnp-org:serviceId:ContentDirectory_control HTTP/1.1
simonc
  • 41,632
  • 12
  • 85
  • 103
electricalbah
  • 2,227
  • 2
  • 22
  • 36

1 Answers1

0

Refering from 'Is there a way to do a PUT with WebClient?',

There are overloads for UploadString that let you specify the method. For example, WebClient.UploadString Method takes a Uri, a string for the method, and a string for the data.

http://msdn.microsoft.com/en-us/library/ms144237.aspx

Community
  • 1
  • 1
yjzhang
  • 4,859
  • 3
  • 19
  • 21