WebRequest.RequestUri プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > WebRequest.RequestUri プロパティの意味・解説 

WebRequest.RequestUri プロパティ

派生クラスオーバーライドされると、要求関連付けられたインターネット リソースURI取得します

名前空間: System.Net
アセンブリ: System (system.dll 内)
構文構文

Public Overridable ReadOnly
 Property RequestUri As Uri
Dim instance As WebRequest
Dim value As Uri

value = instance.RequestUri
public virtual Uri RequestUri { get; }
public:
virtual property Uri^ RequestUri {
    Uri^ get ();
}
/** @property */
public Uri get_RequestUri ()

プロパティ
要求関連付けられているリソースを表す Uri

例外例外
例外種類条件

NotImplementedException

プロパティ派生クラスオーバーライドされていないのに、そのプロパティ取得または設定試行されました。

解説解説
使用例使用例

RequestUri プロパティ確認して最初に要求されサイトかどうか確かめる例を次に示します

' Create a new WebRequest Object to the mentioned URL.
Dim myWebRequest As WebRequest = WebRequest.Create("http://www.example.com")
Console.WriteLine(ControlChars.Cr + "The Uri that responded for
 the Request is   {0}", myWebRequest.RequestUri)
' Assign the response object of 'WebRequest' to a 'WebResponse' variable.
Dim myWebResponse As WebResponse = myWebRequest.GetResponse()
' Print the HTML contents of the page to the console. 
Dim streamResponse As Stream = myWebResponse.GetResponseStream()
Dim streamRead As New StreamReader(streamResponse)
Dim readBuff(256) As [Char]
Dim count As Integer = streamRead.Read(readBuff,
 0, 256)
Console.WriteLine(ControlChars.Cr + "The Uri that responded for
 the Request is   {0}", myWebRequest.RequestUri)
// Create a new WebRequest Object to the mentioned URL.
WebRequest myWebRequest=WebRequest.Create("http://www.example.com");
Console.WriteLine("\nThe Uri that responded for the Request
 is   {0}",myWebRequest.RequestUri);
// Assign the response object of 'WebRequest' to a 'WebResponse' variable.
WebResponse myWebResponse=myWebRequest.GetResponse();
// Print the HTML contents of the page to the console. 
Stream streamResponse=myWebResponse.GetResponseStream();
StreamReader streamRead = new StreamReader( streamResponse );
Char[] readBuff = new Char[256];
int count = streamRead.Read( readBuff, 0, 256 );    
Console.WriteLine("\nThe Uri that responded for the Request
 is '{0}'",myWebRequest.RequestUri);
// Create a new WebRequest object to the mentioned URL.
WebRequest^ myWebRequest = WebRequest::Create( "http://www.example.com"
 );
Console::WriteLine( "\nThe Uri that responded for the Request
 is {0}", myWebRequest->RequestUri );
// Assign the response object of 'WebRequest' to a 'WebResponse' variable.
WebResponse^ myWebResponse = myWebRequest->GetResponse();
// Print the HTML contents of the page to the console.
Stream^ streamResponse = myWebResponse->GetResponseStream();
StreamReader^ streamRead = gcnew StreamReader( streamResponse );
array<Char>^ readBuff = gcnew array<Char>(256);
int count = streamRead->Read( readBuff, 0, 256 );
Console::WriteLine( "\nThe Uri that responded for the Request
 is ' {0}'", myWebRequest->RequestUri );
// Create a new WebRequest Object to the mentioned URL.
WebRequest myWebRequest = WebRequest.Create("http://www.example.com");
Console.WriteLine("\nThe Uri that responded for the Request
 is   {0}",
    myWebRequest.get_RequestUri());
// Assign the response object of 'WebRequest' to a 'WebResponse'
// variable.
WebResponse myWebResponse = myWebRequest.GetResponse();
// Print the HTML contents of the page to the console. 
Stream streamResponse = myWebResponse.GetResponseStream();
StreamReader streamRead = new StreamReader(streamResponse);
char readBuff[] = new char[256];
int count = streamRead.Read(readBuff, 0, 256);
Console.WriteLine("\nThe Uri that responded for the Request"
 
    + " is '{0}'", myWebRequest.get_RequestUri());
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
WebRequest クラス
WebRequest メンバ
System.Net 名前空間
HttpWebRequest.RequestUri プロパティ
HttpWebRequest.Address プロパティ


このページでは「.NET Framework クラス ライブラリ リファレンス」からWebRequest.RequestUri プロパティを検索した結果を表示しています。
Weblioに収録されているすべての辞書からWebRequest.RequestUri プロパティを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からWebRequest.RequestUri プロパティ を検索

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「WebRequest.RequestUri プロパティ」の関連用語

WebRequest.RequestUri プロパティのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



WebRequest.RequestUri プロパティのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS