|
|
@ -192,10 +192,11 @@ class AnalyzeUrl( |
|
|
|
option?.let { _ -> |
|
|
|
option?.let { _ -> |
|
|
|
option.method?.let { if (it.equals("POST", true)) method = RequestMethod.POST } |
|
|
|
option.method?.let { if (it.equals("POST", true)) method = RequestMethod.POST } |
|
|
|
option.headers?.let { headers -> |
|
|
|
option.headers?.let { headers -> |
|
|
|
(headers as? Map<*, *>)?.forEach { key, value -> |
|
|
|
if (headers is Map<*, *>) { |
|
|
|
headerMap[key.toString()] = value.toString() |
|
|
|
headers.forEach { entry -> |
|
|
|
|
|
|
|
headerMap[entry.key.toString()] = entry.value.toString() |
|
|
|
} |
|
|
|
} |
|
|
|
if (headers is String) { |
|
|
|
} else if (headers is String) { |
|
|
|
GSON.fromJsonObject<Map<String, String>>(headers) |
|
|
|
GSON.fromJsonObject<Map<String, String>>(headers) |
|
|
|
?.let { headerMap.putAll(it) } |
|
|
|
?.let { headerMap.putAll(it) } |
|
|
|
} |
|
|
|
} |
|
|
|