UtilWebPostXmlHttpRequest(Uri, String, Encoding, ActionHttpWebRequest) Method

Posts an XML HTTP request to the specified server with a custom Encoding, and returns the response.

Definition

Namespace: DevCase.Core.Networking.Common
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
public static XDocument PostXmlHttpRequest(
	Uri uri,
	string xmlContent,
	Encoding enc,
	Action<HttpWebRequest> request
)

Parameters

uri  Uri
The server Uri.
xmlContent  String
The XML content to POST to the server.
enc  Encoding
The text encoding.
request  ActionHttpWebRequest
A HttpWebRequest object that represents the request parameters and custom header values.

(It is not necessary to set the Method and ContentLength properties)

Return Value

XDocument
The resulting response returned by the server.

Example

This is a code example that demonstrates how to POST a XmlHttpRequest to http://converter.telerik.com/service.asmx service.
C#
No code example is currently available or this language may not be supported.

Exceptions

ArgumentNullException
WebException
Exception

See Also