Http
a singleton class that holds utils common to the Http.
Properties
Functions
similar to the HttpResponse.asClientException only that it covers the ResponseException thrown by Ktor.
Constructs a ClientException based on the HttpResponse
To build a user agent that provide information where this sdk is being used, on client level pass app-version. here we can read the client version. on client sdk level pass client-name and append. and client version on core level read platform level and append. if the value userAgent is null then we pass platform as default. sample output android core-client/0.0.19/ app-version/11.40.0
Returns a Boolean indicating whether the HttpResponse has the specified status code. Reusable, as we can reuse the hasStatus function to check for multiple status codes. rather than creating a single method for each status check e.g isOK,isAccepted,is.....
Returns a Boolean indicating whether the HttpResponse is successful.