Request.smali
.class public final Lcom/squareup/okhttp/Request;
.super Ljava/lang/Object;
.source "Request.java"
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/squareup/okhttp/Request$Builder;
}
.end annotation
# instance fields
.field private final body:Lcom/squareup/okhttp/RequestBody;
.field private volatile cacheControl:Lcom/squareup/okhttp/CacheControl;
.field private final headers:Lcom/squareup/okhttp/Headers;
.field private volatile javaNetUri:Ljava/net/URI;
.field private volatile javaNetUrl:Ljava/net/URL;
.field private final method:Ljava/lang/String;
.field private final tag:Ljava/lang/Object;
.field private final url:Lcom/squareup/okhttp/HttpUrl;
# direct methods
.method private constructor <init>(Lcom/squareup/okhttp/Request$Builder;)V
.registers 3
.line 2
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 3
# getter for: Lcom/squareup/okhttp/Request$Builder;->url:Lcom/squareup/okhttp/HttpUrl;
invoke-static {p1}, Lcom/squareup/okhttp/Request$Builder;->access$000(Lcom/squareup/okhttp/Request$Builder;)Lcom/squareup/okhttp/HttpUrl;
move-result-object v0
iput-object v0, p0, Lcom/squareup/okhttp/Request;->url:Lcom/squareup/okhttp/HttpUrl;
.line 4
# getter for: Lcom/squareup/okhttp/Request$Builder;->method:Ljava/lang/String;
invoke-static {p1}, Lcom/squareup/okhttp/Request$Builder;->access$100(Lcom/squareup/okhttp/Request$Builder;)Ljava/lang/String;
move-result-object v0
iput-object v0, p0, Lcom/squareup/okhttp/Request;->method:Ljava/lang/String;
.line 5
# getter for: Lcom/squareup/okhttp/Request$Builder;->headers:Lcom/squareup/okhttp/Headers$Builder;
invoke-static {p1}, Lcom/squareup/okhttp/Request$Builder;->access$200(Lcom/squareup/okhttp/Request$Builder;)Lcom/squareup/okhttp/Headers$Builder;
move-result-object v0
invoke-virtual {v0}, Lcom/squareup/okhttp/Headers$Builder;->build()Lcom/squareup/okhttp/Headers;
move-result-object v0
iput-object v0, p0, Lcom/squareup/okhttp/Request;->headers:Lcom/squareup/okhttp/Headers;
.line 6
# getter for: Lcom/squareup/okhttp/Request$Builder;->body:Lcom/squareup/okhttp/RequestBody;
invoke-static {p1}, Lcom/squareup/okhttp/Request$Builder;->access$300(Lcom/squareup/okhttp/Request$Builder;)Lcom/squareup/okhttp/RequestBody;
move-result-object v0
iput-object v0, p0, Lcom/squareup/okhttp/Request;->body:Lcom/squareup/okhttp/RequestBody;
.line 7
# getter for: Lcom/squareup/okhttp/Request$Builder;->tag:Ljava/lang/Object;
invoke-static {p1}, Lcom/squareup/okhttp/Request$Builder;->access$400(Lcom/squareup/okhttp/Request$Builder;)Ljava/lang/Object;
move-result-object v0
if-eqz v0, :cond_2a
# getter for: Lcom/squareup/okhttp/Request$Builder;->tag:Ljava/lang/Object;
invoke-static {p1}, Lcom/squareup/okhttp/Request$Builder;->access$400(Lcom/squareup/okhttp/Request$Builder;)Ljava/lang/Object;
move-result-object p1
goto :goto_2b
:cond_2a
move-object p1, p0
:goto_2b
iput-object p1, p0, Lcom/squareup/okhttp/Request;->tag:Ljava/lang/Object;
return-void
.end method
.method synthetic constructor <init>(Lcom/squareup/okhttp/Request$Builder;Lcom/squareup/okhttp/Request$1;)V
.registers 3
.line 1
invoke-direct {p0, p1}, Lcom/squareup/okhttp/Request;-><init>(Lcom/squareup/okhttp/Request$Builder;)V
return-void
.end method
.method static synthetic access$1000(Lcom/squareup/okhttp/Request;)Lcom/squareup/okhttp/Headers;
.registers 1
.line 1
iget-object p0, p0, Lcom/squareup/okhttp/Request;->headers:Lcom/squareup/okhttp/Headers;
return-object p0
.end method
.method static synthetic access$600(Lcom/squareup/okhttp/Request;)Lcom/squareup/okhttp/HttpUrl;
.registers 1
.line 1
iget-object p0, p0, Lcom/squareup/okhttp/Request;->url:Lcom/squareup/okhttp/HttpUrl;
return-object p0
.end method
.method static synthetic access$700(Lcom/squareup/okhttp/Request;)Ljava/lang/String;
.registers 1
.line 1
iget-object p0, p0, Lcom/squareup/okhttp/Request;->method:Ljava/lang/String;
return-object p0
.end method
.method static synthetic access$800(Lcom/squareup/okhttp/Request;)Lcom/squareup/okhttp/RequestBody;
.registers 1
.line 1
iget-object p0, p0, Lcom/squareup/okhttp/Request;->body:Lcom/squareup/okhttp/RequestBody;
return-object p0
.end method
.method static synthetic access$900(Lcom/squareup/okhttp/Request;)Ljava/lang/Object;
.registers 1
.line 1
iget-object p0, p0, Lcom/squareup/okhttp/Request;->tag:Ljava/lang/Object;
return-object p0
.end method
# virtual methods
.method public body()Lcom/squareup/okhttp/RequestBody;
.registers 2
.line 1
iget-object v0, p0, Lcom/squareup/okhttp/Request;->body:Lcom/squareup/okhttp/RequestBody;
return-object v0
.end method
.method public cacheControl()Lcom/squareup/okhttp/CacheControl;
.registers 2
.line 1
iget-object v0, p0, Lcom/squareup/okhttp/Request;->cacheControl:Lcom/squareup/okhttp/CacheControl;
if-eqz v0, :cond_5
goto :goto_d
.line 2
:cond_5
iget-object v0, p0, Lcom/squareup/okhttp/Request;->headers:Lcom/squareup/okhttp/Headers;
invoke-static {v0}, Lcom/squareup/okhttp/CacheControl;->parse(Lcom/squareup/okhttp/Headers;)Lcom/squareup/okhttp/CacheControl;
move-result-object v0
iput-object v0, p0, Lcom/squareup/okhttp/Request;->cacheControl:Lcom/squareup/okhttp/CacheControl;
:goto_d
return-object v0
.end method
.method public header(Ljava/lang/String;)Ljava/lang/String;
.registers 3
.line 1
iget-object v0, p0, Lcom/squareup/okhttp/Request;->headers:Lcom/squareup/okhttp/Headers;
invoke-virtual {v0, p1}, Lcom/squareup/okhttp/Headers;->get(Ljava/lang/String;)Ljava/lang/String;
move-result-object p1
return-object p1
.end method
.method public headers()Lcom/squareup/okhttp/Headers;
.registers 2
.line 1
iget-object v0, p0, Lcom/squareup/okhttp/Request;->headers:Lcom/squareup/okhttp/Headers;
return-object v0
.end method
.method public headers(Ljava/lang/String;)Ljava/util/List;
.registers 3
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/lang/String;",
")",
"Ljava/util/List<",
"Ljava/lang/String;",
">;"
}
.end annotation
.line 2
iget-object v0, p0, Lcom/squareup/okhttp/Request;->headers:Lcom/squareup/okhttp/Headers;
invoke-virtual {v0, p1}, Lcom/squareup/okhttp/Headers;->values(Ljava/lang/String;)Ljava/util/List;
move-result-object p1
return-object p1
.end method
.method public httpUrl()Lcom/squareup/okhttp/HttpUrl;
.registers 2
.line 1
iget-object v0, p0, Lcom/squareup/okhttp/Request;->url:Lcom/squareup/okhttp/HttpUrl;
return-object v0
.end method
.method public isHttps()Z
.registers 2
.line 1
iget-object v0, p0, Lcom/squareup/okhttp/Request;->url:Lcom/squareup/okhttp/HttpUrl;
invoke-virtual {v0}, Lcom/squareup/okhttp/HttpUrl;->isHttps()Z
move-result v0
return v0
.end method
.method public method()Ljava/lang/String;
.registers 2
.line 1
iget-object v0, p0, Lcom/squareup/okhttp/Request;->method:Ljava/lang/String;
return-object v0
.end method
.method public newBuilder()Lcom/squareup/okhttp/Request$Builder;
.registers 3
.line 1
new-instance v0, Lcom/squareup/okhttp/Request$Builder;
const/4 v1, 0x0
invoke-direct {v0, p0, v1}, Lcom/squareup/okhttp/Request$Builder;-><init>(Lcom/squareup/okhttp/Request;Lcom/squareup/okhttp/Request$1;)V
return-object v0
.end method
.method public tag()Ljava/lang/Object;
.registers 2
.line 1
iget-object v0, p0, Lcom/squareup/okhttp/Request;->tag:Ljava/lang/Object;
return-object v0
.end method
.method public toString()Ljava/lang/String;
.registers 3
.line 1
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
const-string v1, "Request{method="
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
iget-object v1, p0, Lcom/squareup/okhttp/Request;->method:Ljava/lang/String;
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string v1, ", url="
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
iget-object v1, p0, Lcom/squareup/okhttp/Request;->url:Lcom/squareup/okhttp/HttpUrl;
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
const-string v1, ", tag="
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
iget-object v1, p0, Lcom/squareup/okhttp/Request;->tag:Ljava/lang/Object;
if-eq v1, p0, :cond_23
goto :goto_24
:cond_23
const/4 v1, 0x0
:goto_24
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
const/16 v1, 0x7d
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
return-object v0
.end method
.method public uri()Ljava/net/URI;
.registers 3
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
:try_start_0
iget-object v0, p0, Lcom/squareup/okhttp/Request;->javaNetUri:Ljava/net/URI;
if-eqz v0, :cond_5
goto :goto_d
.line 2
:cond_5
iget-object v0, p0, Lcom/squareup/okhttp/Request;->url:Lcom/squareup/okhttp/HttpUrl;
invoke-virtual {v0}, Lcom/squareup/okhttp/HttpUrl;->uri()Ljava/net/URI;
move-result-object v0
iput-object v0, p0, Lcom/squareup/okhttp/Request;->javaNetUri:Ljava/net/URI;
:try_end_d
.catch Ljava/lang/IllegalStateException; {:try_start_0 .. :try_end_d} :catch_e
:goto_d
return-object v0
:catch_e
move-exception v0
.line 3
new-instance v1, Ljava/io/IOException;
invoke-virtual {v0}, Ljava/lang/IllegalStateException;->getMessage()Ljava/lang/String;
move-result-object v0
invoke-direct {v1, v0}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
throw v1
.end method
.method public url()Ljava/net/URL;
.registers 2
.line 1
iget-object v0, p0, Lcom/squareup/okhttp/Request;->javaNetUrl:Ljava/net/URL;
if-eqz v0, :cond_5
goto :goto_d
.line 2
:cond_5
iget-object v0, p0, Lcom/squareup/okhttp/Request;->url:Lcom/squareup/okhttp/HttpUrl;
invoke-virtual {v0}, Lcom/squareup/okhttp/HttpUrl;->url()Ljava/net/URL;
move-result-object v0
iput-object v0, p0, Lcom/squareup/okhttp/Request;->javaNetUrl:Ljava/net/URL;
:goto_d
return-object v0
.end method
.method public urlString()Ljava/lang/String;
.registers 2
.line 1
iget-object v0, p0, Lcom/squareup/okhttp/Request;->url:Lcom/squareup/okhttp/HttpUrl;
invoke-virtual {v0}, Lcom/squareup/okhttp/HttpUrl;->toString()Ljava/lang/String;
move-result-object v0
return-object v0
.end method