Files
mono/mcs/class/System.Web.Services/System.Web.Services.Protocols/HttpPostClientProtocol.cs
T
Lluis Sanchez c8a7cd4755 * HtmlFormParameterReader.cs, HtmlFormParameterWriter.cs,
HttpGetClientProtocol.cs, HttpPostClientProtocol.cs,
	  HttpSimpleClientProtocol.cs, MimeFormatter.cs, MimeParameterWriter.cs,
	  NopReturnReader.cs, UrlEncodedParameterWriter.cs, UrlParameterReader.cs,
	  UrlParameterWriter.cs, ValueCollectionParameterReader.cs,
	  WebClientAsyncResult.cs, XmlReturnReader.cs, XmlReturnWriter.cs
	  : Implemented.

	* HttpSoapWebServiceHandler.cs, SoapClientMessage.cs, SoapServerMessage.cs,
	  SoapDocumentationHandler.cs, SoapHttpClientProtocol.cs,
	  WebServiceHelper.cs: Changed due to modifications in  TypeStubInfo.

	* Methods.cs: Moved common code to TypeStubInfo.cs.
	* WebServiceHandler.cs: Moved invoke code to HttpSoapWebServiceHandler.cs
	* ServerProtocol.cs, SoapServerProtocol.cs: Fixed formatting.
	* WebServiceHandlerFactory.cs: Added support for HttpGet and HttpPost.

svn path=/trunk/mcs/; revision=18472
2003-10-01 15:22:05 +00:00

42 lines
1005 B
C#

//
// System.Web.Services.Protocols.HttpPostClientProtocol.cs
//
// Author:
// Tim Coleman ([email protected])
//
// Copyright (C) Tim Coleman, 2002
//
using System.Net;
using System.Web.Services;
namespace System.Web.Services.Protocols {
public class HttpPostClientProtocol : HttpSimpleClientProtocol {
#region Constructors
public HttpPostClientProtocol ()
{
TypeStub = (HttpSimpleTypeStubInfo) TypeStubManager.GetTypeStub (GetType(), typeof (HttpPostMethodStubInfo));
}
#endregion // Constructors
#region Methods
protected override WebRequest GetWebRequest (Uri uri)
{
if (null == uri)
throw new InvalidOperationException ("The uri parameter is a null reference.");
if (String.Empty == uri.ToString ())
throw new InvalidOperationException ("The uri parameter has a length of zero.");
WebRequest request = WebRequest.Create (uri);
request.Method = "POST";
return request;
}
#endregion // Methods
}
}