Share via


RequestUri Property

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

When overridden in a descendant class, gets the URI of the Internet resource associated with the request.

Namespace:  System.Net
Assembly:  System.Http (in System.Http.dll)

Syntax

'Declaration
Public Overridable ReadOnly Property RequestUri As Uri
public virtual Uri RequestUri { get; }
public:
virtual property Uri^ RequestUri {
    Uri^ get ();
}
abstract RequestUri : Uri with get
override RequestUri : Uri with get
function get RequestUri () : Uri

Property Value

Type: System. . :: . .Uri
A Uri representing the resource associated with the request

Remarks

When overridden in a descendant class, the RequestUri property contains the Uri instance that Create method uses to create the request.

Note

The WebRequest class is an abstract class. The actual behavior of WebRequest instances at run time is determined by the descendant class returned by the WebRequest..::..Create method. For more information about default values and exceptions, see the documentation for the descendant classes, such as HttpWebRequest and FileWebRequest.

Notes to Inheritors

RequestUri must contain the original Uri instance passed to the Create method. If the protocol is able to redirect the request to a different URI to service the request, the descendant must provide a property to contain the URI that actually services the request

.NET Framework Security

See Also

Reference

WebRequest Class

System.Net Namespace