Package com.mindee.http
Class MindeeApiCommon
- java.lang.Object
-
- com.mindee.http.MindeeApiCommon
-
- Direct Known Subclasses:
MindeeApi,MindeeApiV2
public abstract class MindeeApiCommon extends Object
Defines common methods for mindee APIs.
-
-
Constructor Summary
Constructors Constructor Description MindeeApiCommon()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StringgetUserAgent()Retrieves the user agent.protected booleanisInvalidStatusCode(int statusCode)Checks if the status code is out of the 2xx-3xx range.protected StringreadRawResponse(org.apache.hc.core5.http.HttpEntity responseEntity)
-
-
-
Method Detail
-
getUserAgent
protected String getUserAgent()
Retrieves the user agent.- Returns:
- the user agent.
-
isInvalidStatusCode
protected boolean isInvalidStatusCode(int statusCode)
Checks if the status code is out of the 2xx-3xx range.- Parameters:
statusCode- the status code to check.- Returns:
trueif the status code is in the 2xx range, false otherwise.
-
readRawResponse
protected String readRawResponse(org.apache.hc.core5.http.HttpEntity responseEntity) throws IOException
- Throws:
IOException
-
-