ServicePointManager.Expect100Continue 속성

정의

100-Continue 동작을 사용할지 여부를 결정하는 Boolean 값을 가져오거나 설정합니다.

public:
 static property bool Expect100Continue { bool get(); void set(bool value); };
public static bool Expect100Continue { get; set; }
static member Expect100Continue : bool with get, set
Public Shared Property Expect100Continue As Boolean

속성 값

100-Continue 동작을 설정하는 경우 true입니다. 기본값은 true입니다.

예제

다음 코드 예제에서는이 속성을 설정합니다.

ServicePointManager::UseNagleAlgorithm = true;
ServicePointManager::Expect100Continue = true;
ServicePointManager::CheckCertificateRevocationList = true;
ServicePointManager::DefaultConnectionLimit = ServicePointManager::DefaultPersistentConnectionLimit;
ServicePointManager.UseNagleAlgorithm = true;
ServicePointManager.Expect100Continue = true;
ServicePointManager.CheckCertificateRevocationList = true;
ServicePointManager.DefaultConnectionLimit = ServicePointManager.DefaultPersistentConnectionLimit;
ServicePointManager.UseNagleAlgorithm = True
ServicePointManager.Expect100Continue = True
ServicePointManager.CheckCertificateRevocationList = True
ServicePointManager.DefaultConnectionLimit = _
    ServicePointManager.DefaultPersistentConnectionLimit

설명

이 속성을 로 true설정하면 100-Continue 동작이 사용됩니다. 및 메서드를 PUT 사용하는 클라이언트 요청은 속성이 이 POSTContentLength 속성이 0보다 크거나 속성 true 이 true이면 Expect100Continue 요청에 Expect 헤더를 SendChunked 추가합니다. 클라이언트는 서버에서 100-Continue 응답을 수신하여 클라이언트가 게시할 데이터를 보내야 함을 나타냅니다. 이 메커니즘은 요청 헤더에 따라 서버에서 요청을 거부 하는 경우 네트워크를 통해 많은 양의 데이터를 전송 하지 않도록 클라이언트를 허용 합니다.

예를 들어 속성이 라고 Expect100Continue 가정합니다 false. 요청이 서버로 전송되면 데이터가 포함됩니다. 요청 헤더를 읽은 후 서버에 인증이 필요하고 401 응답을 보내야 하는 경우 클라이언트는 적절한 인증 헤더로 데이터를 다시 보내야 합니다.

이 속성이 이 true면 요청 헤더가 서버로 전송됩니다. 서버가 요청을 거부하지 않은 경우 데이터를 전송할 수 있음을 알리는 100-Continue 응답을 보냅니다. 앞의 예제와 같이 서버에 인증이 필요한 경우 401 응답을 보내고 클라이언트는 데이터를 불필요하게 전송하지 않았습니다.

이 속성의 값을 변경해도 기존 ServicePoint 개체에는 영향을 주지 않습니다. 변경 후에 만든 새 ServicePoint 개체만 영향을 받습니다.

이 속성이 로 설정된 true경우에도 100-Continue 동작은 HTTP 1.0 요청에 사용되지 않습니다.

100-Continue 예상 동작은 IETF RFC 2616 섹션 10.1.1에 완전히 설명되어 있습니다.

적용 대상

추가 정보