MatchConditions Class
- java.
lang. Object - com.
azure. core. http. MatchConditions
- com.
public class MatchConditions
Specifies HTTP options for conditional requests based on ETag matching.
This class encapsulates the ETag conditions that can be used in a request, such as If-Match and If-None-Match.
This class is useful when you want to create an HTTP request with conditional headers based on ETag matching. For example, you can use it to create a GET request that only retrieves the resource if it has not been modified (based on the ETag), or a PUT request that only updates the resource if it has not been modified by another client (based on the ETag).
Constructor Summary
Constructor | Description |
---|---|
MatchConditions() |
Creates a new instance of MatchConditions. |
Method Summary
Modifier and Type | Method and Description |
---|---|
String |
getIfMatch()
Gets the ETag that resources must match. |
String |
getIfNoneMatch()
Gets the ETag that resources must not match. |
Match |
setIfMatch(String ifMatch)
Optionally limit requests to resources that match the passed ETag. |
Match |
setIfNoneMatch(String ifNoneMatch)
Optionally limit requests to resources that do not match the passed ETag. |
Methods inherited from java.lang.Object
Constructor Details
MatchConditions
public MatchConditions()
Creates a new instance of MatchConditions.
Method Details
getIfMatch
public String getIfMatch()
Gets the ETag that resources must match.
Returns:
getIfNoneMatch
public String getIfNoneMatch()
Gets the ETag that resources must not match.
Returns:
setIfMatch
public MatchConditions setIfMatch(String ifMatch)
Optionally limit requests to resources that match the passed ETag.
Parameters:
Returns:
setIfNoneMatch
public MatchConditions setIfNoneMatch(String ifNoneMatch)
Optionally limit requests to resources that do not match the passed ETag.
Parameters:
Returns:
Applies to
Azure SDK for Java
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기