Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for permitsRequestBody (2.58 sec)

  1. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/http/HttpMethod.kt

            method == "PROPPATCH" ||
            method == "QUERY" ||
            // WebDAV
            method == "REPORT"
        )
    
      @JvmStatic // Despite being 'internal', this method is called by popular 3rd party SDKs.
      fun permitsRequestBody(method: String): Boolean = !(method == "GET" || method == "HEAD")
    
      fun redirectsWithBody(method: String): Boolean = method == "PROPFIND"
    
      fun redirectsToGet(method: String): Boolean = method != "PROPFIND"
    
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Fri Oct 03 17:41:45 UTC 2025
    - 1.7K bytes
    - Viewed (0)
  2. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/http/CallServerInterceptor.kt

        var invokeStartEvent = true
        var responseBuilder: Response.Builder? = null
        var sendRequestException: IOException? = null
        val hasRequestBody = HttpMethod.permitsRequestBody(request.method) && requestBody != null
        val isUpgradeRequest = "upgrade".equals(request.header("Connection"), ignoreCase = true)
        try {
          exchange.writeRequestHeaders(request)
    
          if (hasRequestBody) {
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Thu Oct 30 13:46:58 UTC 2025
    - 7.6K bytes
    - Viewed (0)
  3. okhttp/src/commonJvmAndroid/kotlin/okhttp3/Request.kt

            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."
              }
            }
            this.method = method
            this.body = body
          }
    
        /**
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Thu Oct 30 13:46:58 UTC 2025
    - 14.7K bytes
    - Viewed (1)
Back to top