|
|
|
@ -192,7 +192,7 @@ private fun JSONArray?.toTasks(): List<Task> {
|
|
|
|
|
|
|
|
|
|
|
|
private fun JSONArray?.toActions(): List<BaseAction> {
|
|
|
|
private fun JSONArray?.toActions(): List<BaseAction> {
|
|
|
|
val result: MutableList<BaseAction> = mutableListOf()
|
|
|
|
val result: MutableList<BaseAction> = mutableListOf()
|
|
|
|
val strings = "type-delay-skip_error-async-disconnectWs".split("-")
|
|
|
|
val strings = "type-delay-skip_error-async-disconnect_ws".split("-")
|
|
|
|
if (this == null) return result
|
|
|
|
if (this == null) return result
|
|
|
|
(0 until length()).forEach { index ->
|
|
|
|
(0 until length()).forEach { index ->
|
|
|
|
val actionJson = getJSONObject(index)
|
|
|
|
val actionJson = getJSONObject(index)
|
|
|
|
@ -228,7 +228,7 @@ private fun JSONObject.toHttpAction(
|
|
|
|
async: Boolean,
|
|
|
|
async: Boolean,
|
|
|
|
disconnectWs: Boolean
|
|
|
|
disconnectWs: Boolean
|
|
|
|
): BaseAction {
|
|
|
|
): BaseAction {
|
|
|
|
val strings = "request-url-method-autoCookie-headers-params-cookies-data".split("-")
|
|
|
|
val strings = "request-url-method-auto_cookie-headers-params-cookies-data".split("-")
|
|
|
|
val httpAction = BaseAction.HttpAction(
|
|
|
|
val httpAction = BaseAction.HttpAction(
|
|
|
|
delay = delay,
|
|
|
|
delay = delay,
|
|
|
|
skipError = skipError,
|
|
|
|
skipError = skipError,
|
|
|
|
@ -240,7 +240,7 @@ private fun JSONObject.toHttpAction(
|
|
|
|
val actionRequest = HttpActionRequest(
|
|
|
|
val actionRequest = HttpActionRequest(
|
|
|
|
url = optString(strings[1]),
|
|
|
|
url = optString(strings[1]),
|
|
|
|
method = optString(strings[2]).toHttMethod(),
|
|
|
|
method = optString(strings[2]).toHttMethod(),
|
|
|
|
autoCookie = optBoolean(strings[3]),
|
|
|
|
autoCookie = optBoolean(strings[3], true),
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
val headers = optJSONArray(strings[4])
|
|
|
|
val headers = optJSONArray(strings[4])
|
|
|
|
@ -304,7 +304,7 @@ private fun JSONObject?.toWebSocketAction(
|
|
|
|
val strings = "request-headers-params-cookies-response-next".split("-")
|
|
|
|
val strings = "request-headers-params-cookies-response-next".split("-")
|
|
|
|
val request = optJSONObject(strings[0])
|
|
|
|
val request = optJSONObject(strings[0])
|
|
|
|
request?.run {
|
|
|
|
request?.run {
|
|
|
|
val strings1 = "url-data-autoCookie".split("-")
|
|
|
|
val strings1 = "url-data-auto_cookie".split("-")
|
|
|
|
val webSocketActionRequest = WebSocketActionRequest(
|
|
|
|
val webSocketActionRequest = WebSocketActionRequest(
|
|
|
|
url = optString(strings1[0]),
|
|
|
|
url = optString(strings1[0]),
|
|
|
|
data = optString(strings1[1]),
|
|
|
|
data = optString(strings1[1]),
|
|
|
|
|