Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for NewResponse (0.08 sec)

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

    class ResponseCommonTest {
      @Test fun peekShorterThanResponse() {
        val response = newResponse(responseBody("abcdef"))
        val peekedBody = response.peekBody(3)
        assertThat(peekedBody.string()).isEqualTo("abc")
        assertThat(response.body.string()).isEqualTo("abcdef")
      }
    
      @Test fun peekLongerThanResponse() {
        val response = newResponse(responseBody("abc"))
        val peekedBody = response.peekBody(6)
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 3.6K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/ResponseJvmTest.kt

    import org.junit.jupiter.api.Test
    
    class ResponseJvmTest {
      @Test
      fun testEmptyByDefaultIfTrailersNotSet() {
        val response = newResponse("".toResponseBody())
    
        assertThat(response.trailers()).isEmpty()
      }
    
      @Test
      fun testFailsIfTrailersNotSet() {
        val response =
          newResponse("".toResponseBody()) {
            // All live paths (Http1, Http2) in OkHttp do this
            trailers { error("trailers not available") }
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 3.1K bytes
    - Viewed (0)
  3. cmd/lock-rest-server.go

    	resp := lockRPCLock.NewResponse()
    	success, err := l.ll.Lock(context.Background(), *args)
    	if err == nil && !success {
    		return l.makeResp(resp, errLockConflict)
    	}
    	return l.makeResp(resp, err)
    }
    
    // UnlockHandler - releases the acquired lock.
    func (l *lockRESTServer) UnlockHandler(args *dsync.LockArgs) (*dsync.LockResp, *grid.RemoteErr) {
    	resp := lockRPCUnlock.NewResponse()
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Jul 29 18:10:04 UTC 2024
    - 5.8K bytes
    - Viewed (0)
  4. istioctl/pkg/internaldebug/internal-debug.go

    				Writer:                 c.OutOrStdout(),
    				InternalDebugAllIstiod: internalDebugAllIstiod,
    			}
    			newResponse, err := HandlerForDebugErrors(kubeClient, &centralOpts, c.OutOrStdout(), ctx.IstioNamespace(), xdsResponses)
    			if err != nil {
    				return err
    			}
    			if newResponse != nil {
    				return sw.PrintAll(newResponse)
    			}
    
    			return sw.PrintAll(xdsResponses)
    		},
    	}
    
    Registered: Wed Nov 06 22:53:10 UTC 2024
    - Last Modified: Fri Jul 12 11:30:24 UTC 2024
    - 6.7K bytes
    - Viewed (0)
  5. internal/grid/handlers.go

    	h.sharedResp = true
    	return h
    }
    
    // NewResponse creates a new response.
    // Handlers can use this to create a reusable response.
    // The response may be reused, so caller should clear any fields.
    func (h *SingleHandler[Req, Resp]) NewResponse() Resp {
    	return h.newResp()
    }
    
    // NewRequest creates a new request.
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Sep 09 16:58:30 UTC 2024
    - 27.7K bytes
    - Viewed (0)
  6. cmd/server_test.go

    	decoder = xml.NewDecoder(response.Body)
    	newResponse = &InitiateMultipartUploadResponse{}
    
    	err = decoder.Decode(newResponse)
    	c.Assert(err, nil)
    	c.Assert(len(newResponse.UploadID) > 0, true)
    	// uploadID to be used for rest of the multipart operations on the object.
    	uploadID := newResponse.UploadID
    
    	// content for the part to be uploaded.
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Jul 15 16:28:02 UTC 2024
    - 116.3K bytes
    - Viewed (0)
  7. internal/grid/grid_test.go

    	}, func() *testResponse {
    		return &testResponse{}
    	})
    	// Handles incoming requests, returns a response
    	handler1 := func(req *testRequest) (resp *testResponse, err *RemoteErr) {
    		resp = h1.NewResponse()
    		*resp = testResponse{
    			OrgNum:    req.Num,
    			OrgString: req.String,
    			Embedded:  *req,
    		}
    		return resp, nil
    	}
    	// Return error
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Jul 29 18:10:04 UTC 2024
    - 36.4K bytes
    - Viewed (0)
  8. cmd/storage-rest-server.go

    		for update := range updates {
    			resp := storageNSScannerRPC.NewResponse()
    			resp.Update = &update
    			out <- resp
    		}
    	}()
    	ui, err := s.getStorage().NSScanner(ctx, *params.Cache, updates, madmin.HealScanMode(params.ScanMode), nil)
    	wg.Wait()
    	if err != nil {
    		return grid.NewRemoteErr(err)
    	}
    	// Send final response.
    	resp := storageNSScannerRPC.NewResponse()
    	resp.Final = &ui
    	out <- resp
    	return nil
    }
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Aug 14 17:11:51 UTC 2024
    - 45.7K bytes
    - Viewed (0)
Back to top