HttpWebClientProtocol.UserAgent HttpWebClientProtocol.UserAgent HttpWebClientProtocol.UserAgent HttpWebClientProtocol.UserAgent Property

정의

각 요청과 함께 보내지는 사용자 에이전트 헤더에 대한 값을 가져오거나 설정합니다.Gets or sets the value for the user agent header that is sent with each request.

public:
 property System::String ^ UserAgent { System::String ^ get(); void set(System::String ^ value); };
[System.ComponentModel.Browsable(false)]
public string UserAgent { get; set; }
member this.UserAgent : string with get, set
Public Property UserAgent As String

속성 값

HTTP 프로토콜 사용자 에이전트 헤더의 값입니다.The value of the HTTP protocol user agent header. 기본값은 "MS Web Services Client Protocol number"이며, 여기서 number은 1.0.3705.0과 같은 공용 언어 런타임의 버전입니다.The default is "MS Web Services Client Protocol number ", where number is the version of the common language runtime (for example, 1.0.3705.0).

예제

// MyMath is a proxy class.
test::MyMath^ objMyMath = gcnew test::MyMath;

// Get the default user agent.
Console::WriteLine( "Default user agent is: {0}", objMyMath->UserAgent );
objMyMath->UserAgent = "My Agent";
Console::WriteLine( "Modified user agent is: {0}", objMyMath->UserAgent );
// MyMath is a proxy class.
MyMath objMyMath = new MyMath();

// Get the default user agent.
Console.WriteLine("Default user agent is: " + objMyMath.UserAgent);
objMyMath.UserAgent = "My Agent";
Console.WriteLine("Modified user agent is: " + objMyMath.UserAgent);
' MyMath is a proxy class.
Dim objMyMath As MyMath = new MyMath()

' Get the default user agent.
Console.WriteLine("Default user agent is: " & objMyMath.UserAgent)
objMyMath.UserAgent = "My Agent"
Console.WriteLine("Modified user agent is: " & objMyMath.UserAgent)

설명

사용자 에이전트 문자열에는 클라이언트를 식별 하는 웹 서버를 수 있습니다.The user agent string allows a Web server to identify the client.

적용 대상

추가 정보