Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 28 for bar (0.11 sec)

  1. okhttp/src/test/java/okhttp3/MultipartBodyTest.kt

        val body =
          MultipartBody.Builder()
            .addPart(headersOf("Foo", "Bar"), "Baz".toRequestBody(null))
            .build()
        assertThat(body.parts.size).isEqualTo(1)
        val part1Buffer = Buffer()
        val part1 = body.part(0)
        part1.body.writeTo(part1Buffer)
        assertThat(part1.headers).isEqualTo(headersOf("Foo", "Bar"))
        assertThat(part1Buffer.readUtf8()).isEqualTo("Baz")
      }
    
      @Test
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 10.4K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/internal/http2/HttpOverHttp2Test.kt

        mockWebServer: MockWebServer,
      ) {
        setUp(protocol, mockWebServer)
        val pushPromise =
          PushPromise(
            "GET",
            "/foo/bar",
            headersOf("foo", "bar"),
            MockResponse(body = "bar"),
          )
        server.enqueue(
          MockResponse.Builder()
            .body("ABCDE")
            .addPush(pushPromise)
            .build(),
        )
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 75.3K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/CookieTest.kt

       * present in the public suffix list.
       */
      @Test fun domainIsPublicSuffix() {
        val ascii = "https://foo1.foo.bar.elb.amazonaws.com".toHttpUrl()
        assertThat(parse(ascii, "a=b; domain=foo.bar.elb.amazonaws.com")).isNotNull()
        assertThat(parse(ascii, "a=b; domain=bar.elb.amazonaws.com")).isNull()
        assertThat(parse(ascii, "a=b; domain=com")).isNull()
        val unicode = "https://長.長.長崎.jp".toHttpUrl()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 24.3K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/internal/publicsuffix/PublicSuffixDatabase.kt

        }
    
        // Break apart the domain into UTF-8 labels, i.e. foo.bar.com turns into [foo, bar, com].
        val domainLabelsUtf8Bytes = Array(domainLabels.size) { i -> domainLabels[i].toByteArray() }
    
        // Start by looking for exact matches. We start at the leftmost label. For example, foo.bar.com
        // will look like: [foo, bar, com], [bar, com], [com]. The longest matching rule wins.
        var exactMatch: String? = null
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 11.7K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/CertificatePinnerTest.kt

        }
        assertFailsWith<SSLPeerUnverifiedException> {
          certificatePinner.check("foo.bar.example.co.uk", listOf(certB1.certificate))
        }
        assertFailsWith<SSLPeerUnverifiedException> {
          certificatePinner.check("foo.bar.baz.example.co.uk", listOf(certB1.certificate))
        }
    
        // Should not be pinned:
        certificatePinner.check("uk", listOf(certB1.certificate))
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 9.9K bytes
    - Viewed (0)
  6. okhttp/src/main/kotlin/okhttp3/Cookie.kt

          ) {
            return null
          }
    
          // If the path is absent or didn't start with '/', use the default path. It's a string like
          // '/foo/bar' for a URL like 'http://example.com/foo/bar/baz'. It always starts with '/'.
          if (path == null || !path.startsWith("/")) {
            val encodedPath = url.encodedPath
            val lastSlash = encodedPath.lastIndexOf('/')
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 06 04:12:05 GMT 2024
    - 23.1K bytes
    - Viewed (0)
  7. mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/MockWebServerTest.kt

        assertThat(requestUrl.port).isEqualTo(server.port)
        assertThat(requestUrl.encodedPath).isEqualTo("/a/deep/path")
        assertThat(requestUrl.queryParameter("key")).isEqualTo("foo bar")
      }
    
      @Test
      fun shutdownServerAfterRequest() {
        server.enqueue(MockResponse().setSocketPolicy(SocketPolicy.SHUTDOWN_SERVER_AFTER_RESPONSE))
        val url = server.url("/").toUrl()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 21.9K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/WebPlatformUrlTestData.kt

     *
     * Each line of the `urltestdata.txt` file specifies a test. Lines look like this:
     *
     * ```
     * http://example\t.\norg http://example.org/foo/bar s:http h:example.org p:/
     * ```
     */
    class WebPlatformUrlTestData {
      var input: String? = null
      var base: String? = null
      var scheme = ""
      var username = ""
      var password: String? = null
      var host = ""
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.7K bytes
    - Viewed (0)
  9. mockwebserver/src/test/java/mockwebserver3/CustomDispatcherTest.kt

        assertThat(requestsMade.size).isEqualTo(1)
      }
    
      @Test
      fun outOfOrderResponses() {
        val firstResponseCode = AtomicInteger()
        val secondResponseCode = AtomicInteger()
        val secondRequest = "/bar"
        val firstRequest = "/foo"
        val latch = CountDownLatch(1)
        val dispatcher: Dispatcher =
          object : Dispatcher() {
            override fun dispatch(request: RecordedRequest): MockResponse {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.3K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/CacheTest.kt

        assertThat(recordedRequest1.sequenceNumber).isEqualTo(0)
        val request2 = Request.Builder().url(server.url("/bar")).build()
        val response2 = client.newCall(request2).execute()
        assertThat(response2.body.string()).isEqualTo("ABC")
        val recordedRequest2 = server.takeRequest()
        assertThat(recordedRequest2.requestLine).isEqualTo("GET /bar HTTP/1.1")
        assertThat(recordedRequest2.sequenceNumber).isEqualTo(1)
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 108.6K bytes
    - Viewed (0)
Back to top