123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120 |
- .class public final Lokhttp3/internal/http/RequestLine;
- .super Ljava/lang/Object;
- .source ""
- # direct methods
- .method private constructor <init>()V
- .locals 0
- invoke-direct {p0}, Ljava/lang/Object;-><init>()V
- return-void
- .end method
- .method public static get(Lokhttp3/Request;Ljava/net/Proxy$Type;)Ljava/lang/String;
- .locals 2
- new-instance v0, Ljava/lang/StringBuilder;
- invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
- invoke-virtual {p0}, Lokhttp3/Request;->method()Ljava/lang/String;
- move-result-object v1
- invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
- const/16 v1, 0x20
- invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
- invoke-static {p0, p1}, Lokhttp3/internal/http/RequestLine;->includeAuthorityInRequestLine(Lokhttp3/Request;Ljava/net/Proxy$Type;)Z
- move-result p1
- invoke-virtual {p0}, Lokhttp3/Request;->url()Lokhttp3/HttpUrl;
- move-result-object p0
- if-eqz p1, :cond_0
- invoke-virtual {v0, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
- goto :goto_0
- :cond_0
- invoke-static {p0}, Lokhttp3/internal/http/RequestLine;->requestPath(Lokhttp3/HttpUrl;)Ljava/lang/String;
- move-result-object p0
- invoke-virtual {v0, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
- :goto_0
- const-string p0, " HTTP/1.1"
- invoke-virtual {v0, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
- invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
- move-result-object p0
- return-object p0
- .end method
- .method private static includeAuthorityInRequestLine(Lokhttp3/Request;Ljava/net/Proxy$Type;)Z
- .locals 0
- invoke-virtual {p0}, Lokhttp3/Request;->isHttps()Z
- move-result p0
- if-nez p0, :cond_0
- sget-object p0, Ljava/net/Proxy$Type;->HTTP:Ljava/net/Proxy$Type;
- if-ne p1, p0, :cond_0
- const/4 p0, 0x1
- goto :goto_0
- :cond_0
- const/4 p0, 0x0
- :goto_0
- return p0
- .end method
- .method public static requestPath(Lokhttp3/HttpUrl;)Ljava/lang/String;
- .locals 2
- invoke-virtual {p0}, Lokhttp3/HttpUrl;->encodedPath()Ljava/lang/String;
- move-result-object v0
- invoke-virtual {p0}, Lokhttp3/HttpUrl;->encodedQuery()Ljava/lang/String;
- move-result-object p0
- if-eqz p0, :cond_0
- new-instance v1, Ljava/lang/StringBuilder;
- invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
- invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
- const/16 v0, 0x3f
- invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
- invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
- invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
- move-result-object v0
- :cond_0
- return-object v0
- .end method
|