@@ -357,7 +357,7 @@ public <T> List<T> list(Class<T> cls) {
357357
358358 @ Override
359359 public <T > Stream <T > stream (Class <T > cls ) {
360- final HttpResponse <Stream <String >> res = withResponseHandler (HttpResponse .BodyHandlers .ofLines ());
360+ final HttpResponse <Stream <String >> res = withHandler (HttpResponse .BodyHandlers .ofLines ());
361361 this .httpResponse = res ;
362362 if (res .statusCode () >= 300 ) {
363363 throw new HttpException (res , context );
@@ -367,7 +367,7 @@ public <T> Stream<T> stream(Class<T> cls) {
367367 }
368368
369369 @ Override
370- public <T > HttpResponse <T > withResponseHandler (HttpResponse .BodyHandler <T > responseHandler ) {
370+ public <T > HttpResponse <T > withHandler (HttpResponse .BodyHandler <T > responseHandler ) {
371371 context .beforeRequest (this );
372372 addHeaders ();
373373 HttpResponse <T > response = performSend (responseHandler );
@@ -420,33 +420,33 @@ protected <E> HttpResponse<E> afterAsync(HttpResponse<E> response) {
420420
421421 @ Override
422422 public HttpResponse <byte []> asByteArray () {
423- return withResponseHandler (HttpResponse .BodyHandlers .ofByteArray ());
423+ return withHandler (HttpResponse .BodyHandlers .ofByteArray ());
424424 }
425425
426426 @ Override
427427 public HttpResponse <String > asString () {
428428 loggableResponseBody = true ;
429- return withResponseHandler (HttpResponse .BodyHandlers .ofString ());
429+ return withHandler (HttpResponse .BodyHandlers .ofString ());
430430 }
431431
432432 @ Override
433433 public HttpResponse <Void > asDiscarding () {
434- return withResponseHandler (discarding ());
434+ return withHandler (discarding ());
435435 }
436436
437437 @ Override
438438 public HttpResponse <InputStream > asInputStream () {
439- return withResponseHandler (HttpResponse .BodyHandlers .ofInputStream ());
439+ return withHandler (HttpResponse .BodyHandlers .ofInputStream ());
440440 }
441441
442442 @ Override
443443 public HttpResponse <Path > asFile (Path file ) {
444- return withResponseHandler (HttpResponse .BodyHandlers .ofFile (file ));
444+ return withHandler (HttpResponse .BodyHandlers .ofFile (file ));
445445 }
446446
447447 @ Override
448448 public HttpResponse <Stream <String >> asLines () {
449- return withResponseHandler (HttpResponse .BodyHandlers .ofLines ());
449+ return withHandler (HttpResponse .BodyHandlers .ofLines ());
450450 }
451451
452452 private HttpRequest .Builder newReq (String url ) {
@@ -564,7 +564,7 @@ static class HttpVoidResponse implements HttpResponse<Void> {
564564
565565 private final HttpResponse <?> orig ;
566566
567- @ SuppressWarnings ({"unchecked" , " raw" })
567+ @ SuppressWarnings ({"raw" })
568568 HttpVoidResponse (HttpResponse <?> orig ) {
569569 this .orig = orig ;
570570 }
0 commit comments