513 lines
12 KiB
Smali
513 lines
12 KiB
Smali
.class public Lo0/b0$a;
|
|
.super Ljava/lang/Object;
|
|
.source "Request.kt"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
value = Lo0/b0;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x9
|
|
name = "a"
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field public a:Lo0/y;
|
|
|
|
.field public b:Ljava/lang/String;
|
|
|
|
.field public c:Lokhttp3/Headers$a;
|
|
|
|
.field public d:Lokhttp3/RequestBody;
|
|
|
|
.field public e:Ljava/util/Map;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/Class<",
|
|
"*>;",
|
|
"Ljava/lang/Object;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>()V
|
|
.locals 1
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
new-instance v0, Ljava/util/LinkedHashMap;
|
|
|
|
invoke-direct {v0}, Ljava/util/LinkedHashMap;-><init>()V
|
|
|
|
iput-object v0, p0, Lo0/b0$a;->e:Ljava/util/Map;
|
|
|
|
const-string v0, "GET"
|
|
|
|
iput-object v0, p0, Lo0/b0$a;->b:Ljava/lang/String;
|
|
|
|
new-instance v0, Lokhttp3/Headers$a;
|
|
|
|
invoke-direct {v0}, Lokhttp3/Headers$a;-><init>()V
|
|
|
|
iput-object v0, p0, Lo0/b0$a;->c:Lokhttp3/Headers$a;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Lo0/b0;)V
|
|
.locals 1
|
|
|
|
const-string v0, "request"
|
|
|
|
invoke-static {p1, v0}, Lk0/n/c/i;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
new-instance v0, Ljava/util/LinkedHashMap;
|
|
|
|
invoke-direct {v0}, Ljava/util/LinkedHashMap;-><init>()V
|
|
|
|
iput-object v0, p0, Lo0/b0$a;->e:Ljava/util/Map;
|
|
|
|
iget-object v0, p1, Lo0/b0;->b:Lo0/y;
|
|
|
|
iput-object v0, p0, Lo0/b0$a;->a:Lo0/y;
|
|
|
|
iget-object v0, p1, Lo0/b0;->c:Ljava/lang/String;
|
|
|
|
iput-object v0, p0, Lo0/b0$a;->b:Ljava/lang/String;
|
|
|
|
iget-object v0, p1, Lo0/b0;->e:Lokhttp3/RequestBody;
|
|
|
|
iput-object v0, p0, Lo0/b0$a;->d:Lokhttp3/RequestBody;
|
|
|
|
iget-object v0, p1, Lo0/b0;->f:Ljava/util/Map;
|
|
|
|
invoke-interface {v0}, Ljava/util/Map;->isEmpty()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
new-instance v0, Ljava/util/LinkedHashMap;
|
|
|
|
invoke-direct {v0}, Ljava/util/LinkedHashMap;-><init>()V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
iget-object v0, p1, Lo0/b0;->f:Ljava/util/Map;
|
|
|
|
invoke-static {v0}, Lf/h/a/f/e/n/f;->toMutableMap(Ljava/util/Map;)Ljava/util/Map;
|
|
|
|
move-result-object v0
|
|
|
|
:goto_0
|
|
iput-object v0, p0, Lo0/b0$a;->e:Ljava/util/Map;
|
|
|
|
iget-object p1, p1, Lo0/b0;->d:Lokhttp3/Headers;
|
|
|
|
invoke-virtual {p1}, Lokhttp3/Headers;->e()Lokhttp3/Headers$a;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lo0/b0$a;->c:Lokhttp3/Headers$a;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public a()Lo0/b0;
|
|
.locals 7
|
|
|
|
iget-object v1, p0, Lo0/b0$a;->a:Lo0/y;
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
iget-object v2, p0, Lo0/b0$a;->b:Ljava/lang/String;
|
|
|
|
iget-object v0, p0, Lo0/b0$a;->c:Lokhttp3/Headers$a;
|
|
|
|
invoke-virtual {v0}, Lokhttp3/Headers$a;->c()Lokhttp3/Headers;
|
|
|
|
move-result-object v3
|
|
|
|
iget-object v4, p0, Lo0/b0$a;->d:Lokhttp3/RequestBody;
|
|
|
|
iget-object v0, p0, Lo0/b0$a;->e:Ljava/util/Map;
|
|
|
|
invoke-static {v0}, Lo0/h0/c;->F(Ljava/util/Map;)Ljava/util/Map;
|
|
|
|
move-result-object v5
|
|
|
|
new-instance v6, Lo0/b0;
|
|
|
|
move-object v0, v6
|
|
|
|
invoke-direct/range {v0 .. v5}, Lo0/b0;-><init>(Lo0/y;Ljava/lang/String;Lokhttp3/Headers;Lokhttp3/RequestBody;Ljava/util/Map;)V
|
|
|
|
return-object v6
|
|
|
|
:cond_0
|
|
new-instance v0, Ljava/lang/IllegalStateException;
|
|
|
|
const-string v1, "url == null"
|
|
|
|
invoke-virtual {v1}, Ljava/lang/Object;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public b(Ljava/lang/String;Ljava/lang/String;)Lo0/b0$a;
|
|
.locals 1
|
|
|
|
const-string v0, "name"
|
|
|
|
invoke-static {p1, v0}, Lk0/n/c/i;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v0, "value"
|
|
|
|
invoke-static {p2, v0}, Lk0/n/c/i;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
iget-object v0, p0, Lo0/b0$a;->c:Lokhttp3/Headers$a;
|
|
|
|
invoke-virtual {v0, p1, p2}, Lokhttp3/Headers$a;->e(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Headers$a;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public c(Ljava/lang/String;Lokhttp3/RequestBody;)Lo0/b0$a;
|
|
.locals 3
|
|
|
|
const-string v0, "method"
|
|
|
|
invoke-static {p1, v0}, Lk0/n/c/i;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-interface {p1}, Ljava/lang/CharSequence;->length()I
|
|
|
|
move-result v1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
if-lez v1, :cond_0
|
|
|
|
const/4 v1, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v1, 0x0
|
|
|
|
:goto_0
|
|
if-eqz v1, :cond_6
|
|
|
|
const-string v1, "method "
|
|
|
|
if-nez p2, :cond_4
|
|
|
|
invoke-static {p1, v0}, Lk0/n/c/i;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v0, "POST"
|
|
|
|
invoke-static {p1, v0}, Lk0/n/c/i;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
const-string v0, "PUT"
|
|
|
|
invoke-static {p1, v0}, Lk0/n/c/i;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
const-string v0, "PATCH"
|
|
|
|
invoke-static {p1, v0}, Lk0/n/c/i;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
const-string v0, "PROPPATCH"
|
|
|
|
invoke-static {p1, v0}, Lk0/n/c/i;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
const-string v0, "REPORT"
|
|
|
|
invoke-static {p1, v0}, Lk0/n/c/i;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
:cond_1
|
|
const/4 v2, 0x1
|
|
|
|
:cond_2
|
|
xor-int/lit8 v0, v2, 0x1
|
|
|
|
if-eqz v0, :cond_3
|
|
|
|
goto :goto_1
|
|
|
|
:cond_3
|
|
const-string p2, " must have a request body."
|
|
|
|
invoke-static {v1, p1, p2}, Lf/e/b/a/a;->r(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
new-instance p2, Ljava/lang/IllegalArgumentException;
|
|
|
|
invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-direct {p2, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p2
|
|
|
|
:cond_4
|
|
invoke-static {p1}, Lo0/h0/h/f;->a(Ljava/lang/String;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_5
|
|
|
|
:goto_1
|
|
iput-object p1, p0, Lo0/b0$a;->b:Ljava/lang/String;
|
|
|
|
iput-object p2, p0, Lo0/b0$a;->d:Lokhttp3/RequestBody;
|
|
|
|
return-object p0
|
|
|
|
:cond_5
|
|
const-string p2, " must not have a request body."
|
|
|
|
invoke-static {v1, p1, p2}, Lf/e/b/a/a;->r(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
new-instance p2, Ljava/lang/IllegalArgumentException;
|
|
|
|
invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-direct {p2, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p2
|
|
|
|
:cond_6
|
|
new-instance p1, Ljava/lang/IllegalArgumentException;
|
|
|
|
const-string p2, "method.isEmpty() == true"
|
|
|
|
invoke-virtual {p2}, Ljava/lang/Object;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public d(Ljava/lang/String;)Lo0/b0$a;
|
|
.locals 1
|
|
|
|
const-string v0, "name"
|
|
|
|
invoke-static {p1, v0}, Lk0/n/c/i;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
iget-object v0, p0, Lo0/b0$a;->c:Lokhttp3/Headers$a;
|
|
|
|
invoke-virtual {v0, p1}, Lokhttp3/Headers$a;->d(Ljava/lang/String;)Lokhttp3/Headers$a;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public e(Ljava/lang/Class;Ljava/lang/Object;)Lo0/b0$a;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"<T:",
|
|
"Ljava/lang/Object;",
|
|
">(",
|
|
"Ljava/lang/Class<",
|
|
"-TT;>;TT;)",
|
|
"Lo0/b0$a;"
|
|
}
|
|
.end annotation
|
|
|
|
const-string v0, "type"
|
|
|
|
invoke-static {p1, v0}, Lk0/n/c/i;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
if-nez p2, :cond_0
|
|
|
|
iget-object p2, p0, Lo0/b0$a;->e:Ljava/util/Map;
|
|
|
|
invoke-interface {p2, p1}, Ljava/util/Map;->remove(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
iget-object v0, p0, Lo0/b0$a;->e:Ljava/util/Map;
|
|
|
|
invoke-interface {v0}, Ljava/util/Map;->isEmpty()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
new-instance v0, Ljava/util/LinkedHashMap;
|
|
|
|
invoke-direct {v0}, Ljava/util/LinkedHashMap;-><init>()V
|
|
|
|
iput-object v0, p0, Lo0/b0$a;->e:Ljava/util/Map;
|
|
|
|
:cond_1
|
|
iget-object v0, p0, Lo0/b0$a;->e:Ljava/util/Map;
|
|
|
|
invoke-virtual {p1, p2}, Ljava/lang/Class;->cast(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object p2
|
|
|
|
if-eqz p2, :cond_2
|
|
|
|
invoke-interface {v0, p1, p2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
:goto_0
|
|
return-object p0
|
|
|
|
:cond_2
|
|
invoke-static {}, Lk0/n/c/i;->throwNpe()V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public f(Ljava/lang/String;)Lo0/b0$a;
|
|
.locals 3
|
|
|
|
const-string v0, "url"
|
|
|
|
invoke-static {p1, v0}, Lk0/n/c/i;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v0, "ws:"
|
|
|
|
const/4 v1, 0x1
|
|
|
|
invoke-static {p1, v0, v1}, Lk0/t/k;->startsWith(Ljava/lang/String;Ljava/lang/String;Z)Z
|
|
|
|
move-result v0
|
|
|
|
const-string v2, "(this as java.lang.String).substring(startIndex)"
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
const-string v0, "http:"
|
|
|
|
invoke-static {v0}, Lf/e/b/a/a;->E(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object v0
|
|
|
|
const/4 v1, 0x3
|
|
|
|
invoke-virtual {p1, v1}, Ljava/lang/String;->substring(I)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-static {p1, v2}, Lk0/n/c/i;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const-string v0, "wss:"
|
|
|
|
invoke-static {p1, v0, v1}, Lk0/t/k;->startsWith(Ljava/lang/String;Ljava/lang/String;Z)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
const-string v0, "https:"
|
|
|
|
invoke-static {v0}, Lf/e/b/a/a;->E(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object v0
|
|
|
|
const/4 v1, 0x4
|
|
|
|
invoke-virtual {p1, v1}, Ljava/lang/String;->substring(I)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-static {p1, v2}, Lk0/n/c/i;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
:cond_1
|
|
:goto_0
|
|
const-string v0, "$this$toHttpUrl"
|
|
|
|
invoke-static {p1, v0}, Lk0/n/c/i;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
new-instance v0, Lo0/y$a;
|
|
|
|
invoke-direct {v0}, Lo0/y$a;-><init>()V
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-virtual {v0, v1, p1}, Lo0/y$a;->e(Lo0/y;Ljava/lang/String;)Lo0/y$a;
|
|
|
|
invoke-virtual {v0}, Lo0/y$a;->b()Lo0/y;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p0, p1}, Lo0/b0$a;->g(Lo0/y;)Lo0/b0$a;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public g(Lo0/y;)Lo0/b0$a;
|
|
.locals 1
|
|
|
|
const-string v0, "url"
|
|
|
|
invoke-static {p1, v0}, Lk0/n/c/i;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
iput-object p1, p0, Lo0/b0$a;->a:Lo0/y;
|
|
|
|
return-object p0
|
|
.end method
|