Request.smali 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237
  1. .class public final Lokhttp3/Request;
  2. .super Ljava/lang/Object;
  3. .source ""
  4. # annotations
  5. .annotation system Ldalvik/annotation/MemberClasses;
  6. value = {
  7. Lokhttp3/Request$Builder;
  8. }
  9. .end annotation
  10. # instance fields
  11. .field final body:Lokhttp3/RequestBody;
  12. .field private volatile cacheControl:Lokhttp3/CacheControl;
  13. .field final headers:Lokhttp3/Headers;
  14. .field final method:Ljava/lang/String;
  15. .field final tag:Ljava/lang/Object;
  16. .field final url:Lokhttp3/HttpUrl;
  17. # direct methods
  18. .method constructor <init>(Lokhttp3/Request$Builder;)V
  19. .locals 1
  20. invoke-direct {p0}, Ljava/lang/Object;-><init>()V
  21. iget-object v0, p1, Lokhttp3/Request$Builder;->url:Lokhttp3/HttpUrl;
  22. iput-object v0, p0, Lokhttp3/Request;->url:Lokhttp3/HttpUrl;
  23. iget-object v0, p1, Lokhttp3/Request$Builder;->method:Ljava/lang/String;
  24. iput-object v0, p0, Lokhttp3/Request;->method:Ljava/lang/String;
  25. iget-object v0, p1, Lokhttp3/Request$Builder;->headers:Lokhttp3/Headers$Builder;
  26. invoke-virtual {v0}, Lokhttp3/Headers$Builder;->build()Lokhttp3/Headers;
  27. move-result-object v0
  28. iput-object v0, p0, Lokhttp3/Request;->headers:Lokhttp3/Headers;
  29. iget-object v0, p1, Lokhttp3/Request$Builder;->body:Lokhttp3/RequestBody;
  30. iput-object v0, p0, Lokhttp3/Request;->body:Lokhttp3/RequestBody;
  31. iget-object p1, p1, Lokhttp3/Request$Builder;->tag:Ljava/lang/Object;
  32. if-eqz p1, :cond_0
  33. goto :goto_0
  34. :cond_0
  35. move-object p1, p0
  36. :goto_0
  37. iput-object p1, p0, Lokhttp3/Request;->tag:Ljava/lang/Object;
  38. return-void
  39. .end method
  40. # virtual methods
  41. .method public body()Lokhttp3/RequestBody;
  42. .locals 1
  43. iget-object v0, p0, Lokhttp3/Request;->body:Lokhttp3/RequestBody;
  44. return-object v0
  45. .end method
  46. .method public cacheControl()Lokhttp3/CacheControl;
  47. .locals 1
  48. iget-object v0, p0, Lokhttp3/Request;->cacheControl:Lokhttp3/CacheControl;
  49. if-eqz v0, :cond_0
  50. goto :goto_0
  51. :cond_0
  52. iget-object v0, p0, Lokhttp3/Request;->headers:Lokhttp3/Headers;
  53. invoke-static {v0}, Lokhttp3/CacheControl;->parse(Lokhttp3/Headers;)Lokhttp3/CacheControl;
  54. move-result-object v0
  55. iput-object v0, p0, Lokhttp3/Request;->cacheControl:Lokhttp3/CacheControl;
  56. :goto_0
  57. return-object v0
  58. .end method
  59. .method public header(Ljava/lang/String;)Ljava/lang/String;
  60. .locals 1
  61. iget-object v0, p0, Lokhttp3/Request;->headers:Lokhttp3/Headers;
  62. invoke-virtual {v0, p1}, Lokhttp3/Headers;->get(Ljava/lang/String;)Ljava/lang/String;
  63. move-result-object p1
  64. return-object p1
  65. .end method
  66. .method public headers(Ljava/lang/String;)Ljava/util/List;
  67. .locals 1
  68. .annotation system Ldalvik/annotation/Signature;
  69. value = {
  70. "(",
  71. "Ljava/lang/String;",
  72. ")",
  73. "Ljava/util/List<",
  74. "Ljava/lang/String;",
  75. ">;"
  76. }
  77. .end annotation
  78. iget-object v0, p0, Lokhttp3/Request;->headers:Lokhttp3/Headers;
  79. invoke-virtual {v0, p1}, Lokhttp3/Headers;->values(Ljava/lang/String;)Ljava/util/List;
  80. move-result-object p1
  81. return-object p1
  82. .end method
  83. .method public headers()Lokhttp3/Headers;
  84. .locals 1
  85. iget-object v0, p0, Lokhttp3/Request;->headers:Lokhttp3/Headers;
  86. return-object v0
  87. .end method
  88. .method public isHttps()Z
  89. .locals 1
  90. iget-object v0, p0, Lokhttp3/Request;->url:Lokhttp3/HttpUrl;
  91. invoke-virtual {v0}, Lokhttp3/HttpUrl;->isHttps()Z
  92. move-result v0
  93. return v0
  94. .end method
  95. .method public method()Ljava/lang/String;
  96. .locals 1
  97. iget-object v0, p0, Lokhttp3/Request;->method:Ljava/lang/String;
  98. return-object v0
  99. .end method
  100. .method public newBuilder()Lokhttp3/Request$Builder;
  101. .locals 1
  102. new-instance v0, Lokhttp3/Request$Builder;
  103. invoke-direct {v0, p0}, Lokhttp3/Request$Builder;-><init>(Lokhttp3/Request;)V
  104. return-object v0
  105. .end method
  106. .method public tag()Ljava/lang/Object;
  107. .locals 1
  108. iget-object v0, p0, Lokhttp3/Request;->tag:Ljava/lang/Object;
  109. return-object v0
  110. .end method
  111. .method public toString()Ljava/lang/String;
  112. .locals 2
  113. new-instance v0, Ljava/lang/StringBuilder;
  114. invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
  115. const-string v1, "Request{method="
  116. invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  117. iget-object v1, p0, Lokhttp3/Request;->method:Ljava/lang/String;
  118. invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  119. const-string v1, ", url="
  120. invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  121. iget-object v1, p0, Lokhttp3/Request;->url:Lokhttp3/HttpUrl;
  122. invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
  123. const-string v1, ", tag="
  124. invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
  125. iget-object v1, p0, Lokhttp3/Request;->tag:Ljava/lang/Object;
  126. if-eq v1, p0, :cond_0
  127. goto :goto_0
  128. :cond_0
  129. const/4 v1, 0x0
  130. :goto_0
  131. invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
  132. const/16 v1, 0x7d
  133. invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
  134. invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
  135. move-result-object v0
  136. return-object v0
  137. .end method
  138. .method public url()Lokhttp3/HttpUrl;
  139. .locals 1
  140. iget-object v0, p0, Lokhttp3/Request;->url:Lokhttp3/HttpUrl;
  141. return-object v0
  142. .end method