@ -31,12 +31,12 @@ interface IHttpGetApi {
fun get(
@Url url: String,
@HeaderMap headers: Map<String, String>
): Call<Response<String>>
): Call<String>
@GET
fun getMap(
@QueryMap(encoded = true) queryMap: Map<String, String>,
}
@ -34,12 +34,12 @@ interface IHttpPostApi {
@FieldMap(encoded = true) fieldMap: Map<String, String>,
@POST
fun postBody(
@Body body: RequestBody,
@ -17,7 +17,7 @@ class JsExtensions {
val analyzeUrl = AnalyzeUrl(urlStr, null, null, null, null, null)
val call = analyzeUrl.getResponse()
val response = call.execute()
response.body()?.toString()
response.body()
} catch (e: Exception) {
e.localizedMessage
@ -200,7 +200,7 @@ class AnalyzeUrl(
GET, POST
fun getResponse(): Call<Response<String>> {
fun getResponse(): Call<String> {
return when {
method == Method.POST -> {
if (fieldMap.isNotEmpty()) {