HttpMethod.smali 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219
  1. .class public final Lokhttp3/internal/http/HttpMethod;
  2. .super Ljava/lang/Object;
  3. .source ""
  4. # direct methods
  5. .method private constructor <init>()V
  6. .locals 0
  7. invoke-direct {p0}, Ljava/lang/Object;-><init>()V
  8. return-void
  9. .end method
  10. .method public static invalidatesCache(Ljava/lang/String;)Z
  11. .locals 1
  12. const-string v0, "POST"
  13. invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
  14. move-result v0
  15. if-nez v0, :cond_1
  16. const-string v0, "PATCH"
  17. invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
  18. move-result v0
  19. if-nez v0, :cond_1
  20. const-string v0, "PUT"
  21. invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
  22. move-result v0
  23. if-nez v0, :cond_1
  24. const-string v0, "DELETE"
  25. invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
  26. move-result v0
  27. if-nez v0, :cond_1
  28. const-string v0, "MOVE"
  29. invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
  30. move-result p0
  31. if-eqz p0, :cond_0
  32. goto :goto_0
  33. :cond_0
  34. const/4 p0, 0x0
  35. goto :goto_1
  36. :cond_1
  37. :goto_0
  38. const/4 p0, 0x1
  39. :goto_1
  40. return p0
  41. .end method
  42. .method public static permitsRequestBody(Ljava/lang/String;)Z
  43. .locals 1
  44. invoke-static {p0}, Lokhttp3/internal/http/HttpMethod;->requiresRequestBody(Ljava/lang/String;)Z
  45. move-result v0
  46. if-nez v0, :cond_1
  47. const-string v0, "OPTIONS"
  48. invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
  49. move-result v0
  50. if-nez v0, :cond_1
  51. const-string v0, "DELETE"
  52. invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
  53. move-result v0
  54. if-nez v0, :cond_1
  55. const-string v0, "PROPFIND"
  56. invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
  57. move-result v0
  58. if-nez v0, :cond_1
  59. const-string v0, "MKCOL"
  60. invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
  61. move-result v0
  62. if-nez v0, :cond_1
  63. const-string v0, "LOCK"
  64. invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
  65. move-result p0
  66. if-eqz p0, :cond_0
  67. goto :goto_0
  68. :cond_0
  69. const/4 p0, 0x0
  70. goto :goto_1
  71. :cond_1
  72. :goto_0
  73. const/4 p0, 0x1
  74. :goto_1
  75. return p0
  76. .end method
  77. .method public static redirectsToGet(Ljava/lang/String;)Z
  78. .locals 1
  79. const-string v0, "PROPFIND"
  80. invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
  81. move-result p0
  82. xor-int/lit8 p0, p0, 0x1
  83. return p0
  84. .end method
  85. .method public static redirectsWithBody(Ljava/lang/String;)Z
  86. .locals 1
  87. const-string v0, "PROPFIND"
  88. invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
  89. move-result p0
  90. return p0
  91. .end method
  92. .method public static requiresRequestBody(Ljava/lang/String;)Z
  93. .locals 1
  94. const-string v0, "POST"
  95. invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
  96. move-result v0
  97. if-nez v0, :cond_1
  98. const-string v0, "PUT"
  99. invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
  100. move-result v0
  101. if-nez v0, :cond_1
  102. const-string v0, "PATCH"
  103. invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
  104. move-result v0
  105. if-nez v0, :cond_1
  106. const-string v0, "PROPPATCH"
  107. invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
  108. move-result v0
  109. if-nez v0, :cond_1
  110. const-string v0, "REPORT"
  111. invoke-virtual {p0, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
  112. move-result p0
  113. if-eqz p0, :cond_0
  114. goto :goto_0
  115. :cond_0
  116. const/4 p0, 0x0
  117. goto :goto_1
  118. :cond_1
  119. :goto_0
  120. const/4 p0, 0x1
  121. :goto_1
  122. return p0
  123. .end method