- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for requiresRequestBody (0.19 sec)
-
okhttp/src/test/java/okhttp3/PublicInternalApiTest.kt
@Test fun permitsRequestBody() { assertTrue(permitsRequestBody("POST")) assertFalse(permitsRequestBody("GET")) } @Test fun requiresRequestBody() { assertTrue(requiresRequestBody("PUT")) assertFalse(requiresRequestBody("GET")) } @Test fun hasBody() { val request = Request.Builder().url("http://example.com").build() val response = Response.Builder().code(200)
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.5K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/http/HttpMethod.kt
method == "POST" || method == "PATCH" || method == "PUT" || method == "DELETE" || method == "MOVE" ) @JvmStatic // Despite being 'internal', this method is called by popular 3rd party SDKs. fun requiresRequestBody(method: String): Boolean = ( method == "POST" || method == "PUT" || method == "PATCH" || method == "PROPPATCH" || // WebDAV method == "REPORT" )
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.5K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/-RequestCommon.kt
method: String, body: RequestBody?, ): Request.Builder = apply { require(method.isNotEmpty()) { "method.isEmpty() == true" } if (body == null) { require(!HttpMethod.requiresRequestBody(method)) { "method $method must have a request body." } } else { require(HttpMethod.permitsRequestBody(method)) { "method $method must not have a request body." }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 4.1K bytes - Viewed (0)