Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 89 for isSuccessful (0.14 sec)

  1. docs/recipes.md

            val request = Request.Builder()
                .url("https://publicobject.com/helloworld.txt")
                .build()
    
            client.newCall(request).execute().use { response ->
              if (!response.isSuccessful) throw IOException("Unexpected code $response")
    
              for ((name, value) in response.headers) {
                println("$name: $value")
              }
    
              println(response.body!!.string())
            }
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 30 17:01:12 UTC 2025
    - 47.8K bytes
    - Viewed (0)
  2. samples/guide/src/main/java/okhttp3/recipes/kt/UploadProgress.kt

            .url("https://api.imgur.com/3/image")
            .post(ProgressRequestBody(requestBody, progressListener))
            .build()
    
        client.newCall(request).execute().use { response ->
          if (!response.isSuccessful) throw IOException("Unexpected code $response")
          println(response.body.string())
        }
      }
    
      private class ProgressRequestBody(
        private val delegate: RequestBody,
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 30 17:01:12 UTC 2025
    - 3.8K bytes
    - Viewed (0)
  3. okhttp-sse/src/main/kotlin/okhttp3/sse/internal/RealEventSource.kt

      override fun onResponse(
        call: Call,
        response: Response,
      ) {
        processResponse(response)
      }
    
      internal fun processResponse(response: Response) {
        response.use {
          if (!response.isSuccessful) {
            listener.onFailure(this, null, response)
            return
          }
    
          val body = response.body
    
          if (!body.isEventStream()) {
            listener.onFailure(
              this,
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 30 11:47:47 UTC 2025
    - 3.3K bytes
    - Viewed (0)
  4. samples/guide/src/main/java/okhttp3/recipes/UploadProgress.java

          .url("https://api.imgur.com/3/image")
          .post(new ProgressRequestBody(requestBody, progressListener))
          .build();
    
        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 UploadProgress().run();
      }
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 30 17:01:12 UTC 2025
    - 4.2K bytes
    - Viewed (1)
  5. src/test/java/org/codelibs/fess/job/PurgeDocJobTest.java

            RangeQueryBuilder rangeQuery = (RangeQueryBuilder) deleteQuery;
            assertEquals("expires", rangeQuery.fieldName());
            assertEquals("now", rangeQuery.to());
    
            // Assert result is empty when successful
            assertEquals("", result);
        }
    
        public void test_execute_withException() {
            // Create mock SearchEngineClient that throws exception
            searchEngineClient = new SearchEngineClient() {
    Registered: Thu Sep 04 12:52:25 UTC 2025
    - Last Modified: Tue Aug 19 14:09:36 UTC 2025
    - 16.1K bytes
    - Viewed (0)
  6. src/main/java/jcifs/internal/smb2/persistent/PersistentHandleManager.java

            HandleGuid guid = new HandleGuid();
    
            // Create handle info with empty file ID (will be populated after successful create response)
            HandleInfo info = new HandleInfo(path, guid, new byte[16], type, timeout, leaseKey);
    
            lock.writeLock().lock();
            try {
                handles.put(path, info);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sun Aug 24 00:49:49 UTC 2025
    - 13K bytes
    - Viewed (0)
  7. src/main/java/jcifs/internal/witness/WitnessUnregisterResponse.java

        public WitnessUnregisterResponse() {
            // Default constructor
        }
    
        private int returnCode;
        private String error;
    
        /**
         * Checks if the unregistration was successful.
         *
         * @return true if successful
         */
        public boolean isSuccess() {
            return returnCode == 0;
        }
    
        /**
         * Gets a human-readable error description.
         *
         * @return the error description
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sun Aug 24 00:12:28 UTC 2025
    - 2K bytes
    - Viewed (0)
  8. src/test/java/jcifs/internal/witness/WitnessClientTest.java

        @Test
        void testUnregistration() throws Exception {
            // Setup successful registration
            WitnessRegisterResponse registerResponse = mock(WitnessRegisterResponse.class);
            lenient().when(registerResponse.isSuccess()).thenReturn(true);
            lenient().when(registerResponse.getRegistrationId()).thenReturn("test-reg-123");
    
            // Setup successful unregistration
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 23 09:06:40 UTC 2025
    - 9.8K bytes
    - Viewed (0)
  9. src/main/java/jcifs/internal/smb2/rdma/SmbDirectNegotiateResponse.java

            idx += 4;
            SMBUtil.writeInt4(maxFragmentedSize, data, idx);
    
            return data;
        }
    
        /**
         * Check if negotiation was successful
         *
         * @return true if successful
         */
        public boolean isSuccess() {
            return status == STATUS_SUCCESS;
        }
    
        // Getters and setters
    
        /**
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sun Aug 24 00:12:28 UTC 2025
    - 9.3K bytes
    - Viewed (0)
  10. src/main/java/jcifs/internal/smb2/lease/DirectoryChangeNotifier.java

         *
         * Current strategy is based on failure count. In the future, this could be enhanced to consider:
         * - Recent event frequency (successful notifications)
         * - Time since last successful notification
         * - Events per unit time for more adaptive behavior
         *
         * @param handle notification handle
         * @return polling interval in milliseconds
         */
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 13.7K bytes
    - Viewed (0)
Back to top