Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 52 for add_header (0.14 sec)

  1. src/main/java/org/codelibs/fess/cors/DefaultCorsHandler.java

            httpResponse.addHeader(ACCESS_CONTROL_ALLOW_ORIGIN, origin);
            httpResponse.addHeader(ACCESS_CONTROL_ALLOW_METHODS, fessConfig.getApiCorsAllowMethods());
            httpResponse.addHeader(ACCESS_CONTROL_ALLOW_HEADERS, fessConfig.getApiCorsAllowHeaders());
            httpResponse.addHeader(ACCESS_CONTROL_MAX_AGE, fessConfig.getApiCorsMaxAge());
    Registered: Thu Oct 31 13:40:30 UTC 2024
    - Last Modified: Thu Feb 22 01:53:18 UTC 2024
    - 2K bytes
    - Viewed (0)
  2. impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/mvnenc/goals/Init.java

                secDispatcher.writeConfiguration(config);
            } else {
                context.addInHeader("");
                context.addInHeader("Values set:");
                context.addInHeader("defaultDispatcher=" + config.getDefaultDispatcher());
                for (Config c : config.getConfigurations()) {
                    context.addInHeader("  dispatcherName=" + c.getName());
                    for (ConfigProperty cp : c.getProperties()) {
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 12.1K bytes
    - Viewed (0)
  3. samples/guide/src/main/java/okhttp3/recipes/kt/AccessHeaders.kt

      fun run() {
        val request =
          Request.Builder()
            .url("https://api.github.com/repos/square/okhttp/issues")
            .header("User-Agent", "OkHttp Headers.java")
            .addHeader("Accept", "application/json; q=0.5")
            .addHeader("Accept", "application/vnd.github.v3+json")
            .build()
    
        client.newCall(request).execute().use { response ->
          if (!response.isSuccessful) throw IOException("Unexpected code $response")
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 1.4K bytes
    - Viewed (0)
  4. okhttp/src/test/java/okhttp3/DuplexTest.kt

        val body =
          MockStreamHandler()
            .sendResponse("ok")
            .exhaustResponse()
        server.enqueue(
          MockResponse.Builder()
            .clearHeaders()
            .addHeader("h1", "v1")
            .addHeader("h2", "v2")
            .trailers(headersOf("trailers", "boom"))
            .streamHandler(body)
            .build(),
        )
        val call =
          client.newCall(
            Request.Builder()
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Jan 20 10:30:28 UTC 2024
    - 23.9K bytes
    - Viewed (0)
  5. mockwebserver/src/main/kotlin/mockwebserver3/MockResponse.kt

         * by a colon and a value.
         */
        fun addHeader(header: String) =
          apply {
            headers.add(header)
          }
    
        /**
         * Adds a new header with the name and value. This may be used to add multiple headers with the
         * same name.
         */
        fun addHeader(
          name: String,
          value: Any,
        ) = apply {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Tue Jan 23 14:31:42 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  6. mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/KotlinSourceModernTest.kt

        var headers: Headers = mockResponse.headers
        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()
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 7.3K bytes
    - Viewed (0)
  7. okhttp/src/test/java/okhttp3/URLConnectionTest.kt

            .status("ICY 200 OK")
            .addHeader("Accept-Ranges: none")
            .addHeader("Content-Type: audio/mpeg")
            .addHeader("icy-br:128")
            .addHeader("ice-audio-info: bitrate=128;samplerate=44100;channels=2")
            .addHeader("icy-br:128")
            .addHeader("icy-description:Rock")
            .addHeader("icy-genre:riders")
            .addHeader("icy-name:A2RRock")
            .addHeader("icy-pub:1")
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Jan 20 10:30:28 UTC 2024
    - 131.7K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/RequestTest.kt

        builder.header("AZab09~", "AZab09 ~")
        builder.addHeader("AZab09~", "AZab09 ~")
      }
    
      @Test
      fun emptyNameForbidden() {
        val builder = Request.Builder()
        assertFailsWith<IllegalArgumentException> {
          builder.header("", "Value")
        }
        assertFailsWith<IllegalArgumentException> {
          builder.addHeader("", "Value")
        }
      }
    
      @Test
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 16.4K bytes
    - Viewed (0)
  9. mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/MockWebServerTest.kt

          MockResponse()
            .clearHeaders()
            .addHeader("Cookie: s=square")
            .addHeader("Cookie", "a=android")
        assertThat(headersToList(response))
          .containsExactly("Cookie: s=square", "Cookie: a=android")
      }
    
      @Test
      fun mockResponseSetHeader() {
        val response =
          MockResponse()
            .clearHeaders()
            .addHeader("Cookie: s=square")
            .addHeader("Cookie: a=android")
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 21.9K bytes
    - Viewed (0)
  10. mockwebserver/src/test/java/mockwebserver3/MockWebServerTest.kt

            .clearHeaders()
            .addHeader("Cookie: s=square")
            .addHeader("Cookie", "a=android")
        assertThat(headersToList(builder)).containsExactly("Cookie: s=square", "Cookie: a=android")
      }
    
      @Test
      fun mockResponseSetHeader() {
        val builder =
          MockResponse.Builder()
            .clearHeaders()
            .addHeader("Cookie: s=square")
            .addHeader("Cookie: a=android")
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 23.5K bytes
    - Viewed (0)
Back to top