HasAcceptHeader Class — spring-boot Architecture
Architecture documentation for the HasAcceptHeader class in AbstractHttpClientMockTests.java from the spring-boot codebase.
Entity Profile
Source Code
cli/spring-boot-cli/src/test/java/org/springframework/boot/cli/command/init/AbstractHttpClientMockTests.java lines 179–202
static class HasAcceptHeader implements ArgumentMatcher<HttpGet> {
private final String value;
private final boolean shouldMatch;
HasAcceptHeader(String value, boolean shouldMatch) {
this.value = value;
this.shouldMatch = shouldMatch;
}
@Override
public boolean matches(HttpGet get) {
if (get == null) {
return false;
}
Header acceptHeader = get.getFirstHeader(HttpHeaders.ACCEPT);
if (this.shouldMatch) {
return acceptHeader != null && this.value.equals(acceptHeader.getValue());
}
return acceptHeader == null || !this.value.equals(acceptHeader.getValue());
}
}
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free