Search Options

Results per page
Sort
Preferred Languages
Advance

Results 81 - 90 of 248 for code (0.13 sec)

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

              if (c != '\\'.code) {
                append(c.toChar())
                continue
              }
              when (buffer.readUtf8CodePoint()) {
                '\\'.code -> append('\\')
                '#'.code -> append('#')
                'n'.code -> append('\n')
                'r'.code -> append('\r')
                's'.code -> append(' ')
                't'.code -> append('\t')
                'f'.code -> append('\u000c')
    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)
  2. okhttp/src/test/java/okhttp3/InterceptorTest.kt

        server.enqueue(
          MockResponse.Builder()
            .code(500)
            .build(),
        )
        val interceptor =
          Interceptor { chain: Interceptor.Chain ->
            Response.Builder()
              .request(chain.request())
              .protocol(Protocol.HTTP_1_1)
              .code(200)
              .message("Intercepted!")
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Jan 14 10:20:09 GMT 2024
    - 27.8K bytes
    - Viewed (0)
  3. samples/guide/src/main/java/okhttp3/recipes/PostMultipart.java

            .url("https://api.imgur.com/3/image")
            .post(requestBody)
            .build();
    
        try (Response response = client.newCall(request).execute()) {
          if (!response.isSuccessful()) throw new IOException("Unexpected code " + response);
    
          System.out.println(response.body().string());
        }
      }
    
      public static void main(String... args) throws Exception {
        new PostMultipart().run();
      }
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jun 24 12:59:42 GMT 2019
    - 2.2K bytes
    - Viewed (0)
  4. okhttp/src/test/java/okhttp3/FormBodyTest.kt

      private fun formEncode(codePoint: Int): String {
        // Wrap the codepoint with regular printable characters to prevent trimming.
        val body =
          FormBody.Builder()
            .add("a", String(intArrayOf('b'.code, codePoint, 'c'.code), 0, 3))
            .build()
        val buffer = Buffer()
        body.writeTo(buffer)
        buffer.skip(3) // Skip "a=b" prefix.
        return buffer.readUtf8(buffer.size - 1) // Skip the "c" suffix.
      }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 7.8K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/EventListenerTest.kt

          )
        val response1 = call1.execute()
        assertThat(response1.code).isEqualTo(200)
        response1.body.close()
        listener.clearAllEvents()
        val call2 =
          client.newCall(
            Request.Builder()
              .url(server.url("/"))
              .build(),
          )
        val response2 = call2.execute()
        assertThat(response2.code).isEqualTo(200)
        response2.body.close()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 56.9K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/internal/ws/RealWebSocketTest.kt

      }
    
      @Test
      fun clientCloseWith0Fails() {
        assertFailsWith<IllegalArgumentException> {
          client.webSocket!!.close(0, null)
        }.also { expected ->
          assertThat("Code must be in range [1000,5000): 0")
            .isEqualTo(expected.message)
        }
      }
    
      @Test
      fun afterSocketClosedPingFailsWebSocket() {
        client2Server.source.close()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 11 01:59:58 GMT 2024
    - 18.5K bytes
    - Viewed (0)
  7. samples/slack/src/main/java/okhttp3/slack/OAuthSessionFactory.java

        return mockWebServer.url("/oauth/");
      }
    
      /** When the browser hits the redirect URL, use the provided code to ask Slack for a session. */
      @Override public MockResponse dispatch(RecordedRequest request) {
        HttpUrl requestUrl = mockWebServer.url(request.getPath());
        String code = requestUrl.queryParameter("code");
        String stateString = requestUrl.queryParameter("state");
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Aug 12 07:26:27 GMT 2021
    - 3.8K bytes
    - Viewed (0)
  8. okhttp/src/main/kotlin/okhttp3/HttpUrl.kt

                        alreadyEncoded = true,
                      )
                  }
                  pos = componentDelimiterOffset + 1
                }
    
                -1, '/'.code, '\\'.code, '?'.code, '#'.code -> {
                  // Host info precedes.
                  val portColonOffset = portColonOffset(input, pos, componentDelimiterOffset)
                  if (portColonOffset + 1 < componentDelimiterOffset) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 09 12:33:05 GMT 2024
    - 63.5K bytes
    - Viewed (1)
  9. okhttp/src/test/java/okhttp3/CookiesTest.kt

        redirectTarget.start()
        val redirectTargetUrl = urlWithIpAddress(redirectTarget, "/")
        val redirectSource = MockWebServer()
        redirectSource.enqueue(
          MockResponse.Builder()
            .code(HttpURLConnection.HTTP_MOVED_TEMP)
            .addHeader("Location: $redirectTargetUrl")
            .build(),
        )
        redirectSource.start()
        val redirectSourceUrl = urlWithIpAddress(redirectSource, "/")
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 13K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/CallKotlinTest.kt

          override fun writeTo(sink: BufferedSink) {
            sink.writeUtf8("<element/>")
            sink.flush()
          }
        }
    
        server.enqueue(MockResponse(code = 201))
        server.enqueue(MockResponse(code = 204))
        server.enqueue(MockResponse(code = 204))
    
        val endpointUrl = server.url("/endpoint")
    
        var request =
          Request.Builder()
            .url(endpointUrl)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 8.4K bytes
    - Viewed (0)
Back to top