public final class HttpUtils extends Object
Modifier and Type | Method and Description |
---|---|
static String |
verifyContentTypeIsAnyOf(org.apache.http.HttpResponse httpResponse,
String... contentTypes)
Verify that a given
HttpResponse does define any of the given content types. |
static int |
verifyStatusCodeIsAnyOf(org.apache.http.HttpResponse httpResponse,
int... statusCodes)
Verify that a given
HttpResponse does have any of the given status codes. |
public static int verifyStatusCodeIsAnyOf(org.apache.http.HttpResponse httpResponse, int... statusCodes)
HttpResponse
does have any of the given status codes.httpResponse
- The HttpResponse
to verify the status code ofstatusCodes
- The status codes to look forHttpResponse
IllegalStateException
- When none of the given status codes matches the actual one@Nonnull public static String verifyContentTypeIsAnyOf(org.apache.http.HttpResponse httpResponse, String... contentTypes)
HttpResponse
does define any of the given content types.httpResponse
- The HttpResponse
to verify the content type ofcontentTypes
- The content types to look forHttpResponse
IllegalStateException
- When the given HttpResponse
does not define a content type header
or when none of the given content types matches the actual oneCopyright © 2019. All rights reserved.