WebClientProtocol.RequestEncoding Property

The Encoding used to make the client request to the XML Web service.

[Visual Basic]
Public Property RequestEncoding As Encoding
public Encoding RequestEncoding {get; set;}
public: __property Encoding* get_RequestEncoding();
public: __property void set_RequestEncoding(Encoding*);
public function get RequestEncoding() : Encoding;
public function set RequestEncoding(Encoding);

Property Value

The character encoding for the client request. The default is a null reference (Nothing in Visual Basic), which uses the default encoding for the underlying transport and protocol.


The RequestEncoding determines the encoding for the request message. The ContentType of the request will be annotated with the encoding value.

Classes deriving from WebClientProtocol support a particular protocol, such as SoapHttpClientProtocol does for SOAP, set this property to conform to encoding requirements for the specific protocol. For example, the SoapHttpClientProtocol sets the default encoding to UTF-8.


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework

See Also

WebClientProtocol Class | WebClientProtocol Members | System.Web.Services.Protocols Namespace | Encoding | ContentType | WebRequest