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 String
getUserAgent()
Retrieves the user agent.protected boolean
isInvalidStatusCode(int statusCode)
Checks if the status code is out of the 2xx-3xx range.protected String
readRawResponse(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:
true
if 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
-
-