Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 12 for addHeaderLenient (0.47 sec)

  1. mockwebserver-deprecated/src/main/kotlin/okhttp3/mockwebserver/MockResponse.kt

        }
    
      fun addHeader(
        name: String,
        value: Any,
      ) = apply {
        headersBuilder.add(name, value.toString())
      }
    
      fun addHeaderLenient(
        name: String,
        value: Any,
      ) = apply {
        addHeaderLenient(headersBuilder, name, value.toString())
      }
    
      fun setHeader(
        name: String,
        value: Any,
      ) = apply {
        removeHeader(name)
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 7.2K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/internal.kt

    internal fun cookieToString(
      cookie: Cookie,
      forObsoleteRfc2965: Boolean,
    ): String = cookie.toString(forObsoleteRfc2965)
    
    internal fun addHeaderLenient(
      builder: Headers.Builder,
      line: String,
    ): Headers.Builder = builder.addLenient(line)
    
    internal fun addHeaderLenient(
      builder: Headers.Builder,
      name: String,
      value: String,
    ): Headers.Builder = builder.addLenient(name, value)
    
    internal fun cacheGet(
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 3.7K bytes
    - Viewed (0)
  3. mockwebserver/src/main/kotlin/mockwebserver3/MockResponse.kt

         * same name. Unlike [addHeader] this does not validate the name and
         * value.
         */
        fun addHeaderLenient(
          name: String,
          value: Any,
        ) = apply {
          addHeaderLenient(headers, name, value.toString())
        }
    
        /** Removes all headers named [name], then adds a new header with the name and value. */
        fun setHeader(
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Tue Jan 23 14:31:42 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  4. mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/KotlinSourceModernTest.kt

        var trailers: Headers = mockResponse.trailers
        mockResponse = mockResponse.clearHeaders()
        mockResponse = mockResponse.addHeader("")
        mockResponse = mockResponse.addHeader("", "")
        mockResponse = mockResponse.addHeaderLenient("", Any())
        mockResponse = mockResponse.setHeader("", Any())
        mockResponse.headers = headersOf()
        mockResponse.trailers = headersOf()
        mockResponse = mockResponse.removeHeader("")
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 7.3K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/CacheTest.kt

            .addHeader("Cache-Control: max-age=0")
            .addHeaderLenient("Alpha", "α")
            .addHeaderLenient("β", "Beta")
            .body("abcd")
            .build(),
        )
        server.enqueue(
          MockResponse.Builder()
            .addHeader("Transfer-Encoding: none")
            .addHeaderLenient("Gamma", "Γ")
            .addHeaderLenient("Δ", "Delta")
            .code(HttpURLConnection.HTTP_NOT_MODIFIED)
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Wed Apr 10 19:46:48 UTC 2024
    - 108.6K bytes
    - Viewed (0)
  6. mockwebserver-deprecated/api/mockwebserver.api

    	public fun <init> ()V
    	public final fun addHeader (Ljava/lang/String;)Lokhttp3/mockwebserver/MockResponse;
    	public final fun addHeader (Ljava/lang/String;Ljava/lang/Object;)Lokhttp3/mockwebserver/MockResponse;
    	public final fun addHeaderLenient (Ljava/lang/String;Ljava/lang/Object;)Lokhttp3/mockwebserver/MockResponse;
    	public final fun clearHeaders ()Lokhttp3/mockwebserver/MockResponse;
    	public synthetic fun clone ()Ljava/lang/Object;
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Jul 22 12:28:51 UTC 2023
    - 10.2K bytes
    - Viewed (0)
  7. mockwebserver/api/mockwebserver3.api

    	public final fun addHeader (Ljava/lang/String;)Lmockwebserver3/MockResponse$Builder;
    	public final fun addHeader (Ljava/lang/String;Ljava/lang/Object;)Lmockwebserver3/MockResponse$Builder;
    	public final fun addHeaderLenient (Ljava/lang/String;Ljava/lang/Object;)Lmockwebserver3/MockResponse$Builder;
    	public final fun addInformationalResponse (Lmockwebserver3/MockResponse;)Lmockwebserver3/MockResponse$Builder;
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Tue Jan 03 21:59:45 UTC 2023
    - 12.7K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/URLConnectionTest.kt

      }
    
      @Test
      fun responseHeaderParsingIsLenient() {
        val headersBuilder = Headers.Builder()
        headersBuilder.add("Content-Length", "0")
        addHeaderLenient(headersBuilder, "a\tb: c\u007fd")
        addHeaderLenient(headersBuilder, ": ef")
        addHeaderLenient(headersBuilder, "\ud83c\udf69: \u2615\ufe0f")
        val headers = headersBuilder.build()
        server.enqueue(MockResponse(headers = headers))
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Jan 20 10:30:28 UTC 2024
    - 131.7K bytes
    - Viewed (0)
  9. mockwebserver/src/main/kotlin/mockwebserver3/MockWebServer.kt

    import okhttp3.Headers
    import okhttp3.Headers.Companion.headersOf
    import okhttp3.HttpUrl
    import okhttp3.Protocol
    import okhttp3.Request
    import okhttp3.Response
    import okhttp3.internal.addHeaderLenient
    import okhttp3.internal.closeQuietly
    import okhttp3.internal.concurrent.TaskRunner
    import okhttp3.internal.http.HttpMethod
    import okhttp3.internal.http2.ErrorCode
    import okhttp3.internal.http2.Header
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sun Mar 31 17:16:15 UTC 2024
    - 37.4K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/CallTest.kt

      @Test
      fun responseHeaderParsingIsLenient() {
        val headersBuilder = Headers.Builder()
        headersBuilder.add("Content-Length", "0")
        addHeaderLenient(headersBuilder, "a\tb: c\u007fd")
        addHeaderLenient(headersBuilder, ": ef")
        addHeaderLenient(headersBuilder, "\ud83c\udf69: \u2615\ufe0f")
        val headers = headersBuilder.build()
        server.enqueue(MockResponse(headers = headers))
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Wed Apr 10 19:46:48 UTC 2024
    - 142.5K bytes
    - Viewed (0)
Back to top