diff --git a/changelog/@unreleased/pr-1916.v2.yml b/changelog/@unreleased/pr-1916.v2.yml new file mode 100644 index 000000000..4b27a98fc --- /dev/null +++ b/changelog/@unreleased/pr-1916.v2.yml @@ -0,0 +1,5 @@ +type: improvement +improvement: + description: Fix unused warnings in eclipse + links: + - https://github.com/palantir/conjure-java/pull/1916 diff --git a/conjure-java-core/src/integrationInput/java/com/palantir/product/CookieServiceAsync.java b/conjure-java-core/src/integrationInput/java/com/palantir/product/CookieServiceAsync.java index 0ecf2c4e5..7f4dc04c7 100644 --- a/conjure-java-core/src/integrationInput/java/com/palantir/product/CookieServiceAsync.java +++ b/conjure-java-core/src/integrationInput/java/com/palantir/product/CookieServiceAsync.java @@ -32,14 +32,14 @@ public interface CookieServiceAsync { */ static CookieServiceAsync of(EndpointChannelFactory _endpointChannelFactory, ConjureRuntime _runtime) { return new CookieServiceAsync() { - private final PlainSerDe _plainSerDe = _runtime.plainSerDe(); - private final EndpointChannel eatCookiesChannel = _endpointChannelFactory.endpoint(DialogueCookieEndpoints.eatCookies); private final Deserializer eatCookiesDeserializer = _runtime.bodySerDe().emptyBodyDeserializer(); + private final PlainSerDe _plainSerDe = _runtime.plainSerDe(); + @Override public ListenableFuture eatCookies(BearerToken token) { Request.Builder _request = Request.builder(); diff --git a/conjure-java-core/src/integrationInput/java/com/palantir/product/CookieServiceBlocking.java b/conjure-java-core/src/integrationInput/java/com/palantir/product/CookieServiceBlocking.java index d7f2ac5ed..f5e6e84a6 100644 --- a/conjure-java-core/src/integrationInput/java/com/palantir/product/CookieServiceBlocking.java +++ b/conjure-java-core/src/integrationInput/java/com/palantir/product/CookieServiceBlocking.java @@ -31,14 +31,14 @@ public interface CookieServiceBlocking { */ static CookieServiceBlocking of(EndpointChannelFactory _endpointChannelFactory, ConjureRuntime _runtime) { return new CookieServiceBlocking() { - private final PlainSerDe _plainSerDe = _runtime.plainSerDe(); - private final EndpointChannel eatCookiesChannel = _endpointChannelFactory.endpoint(DialogueCookieEndpoints.eatCookies); private final Deserializer eatCookiesDeserializer = _runtime.bodySerDe().emptyBodyDeserializer(); + private final PlainSerDe _plainSerDe = _runtime.plainSerDe(); + @Override public void eatCookies(BearerToken token) { Request.Builder _request = Request.builder(); diff --git a/conjure-java-core/src/integrationInput/java/com/palantir/product/EmptyPathServiceAsync.java b/conjure-java-core/src/integrationInput/java/com/palantir/product/EmptyPathServiceAsync.java index 33b1403a4..c3b66830c 100644 --- a/conjure-java-core/src/integrationInput/java/com/palantir/product/EmptyPathServiceAsync.java +++ b/conjure-java-core/src/integrationInput/java/com/palantir/product/EmptyPathServiceAsync.java @@ -10,7 +10,6 @@ import com.palantir.dialogue.Endpoint; import com.palantir.dialogue.EndpointChannel; import com.palantir.dialogue.EndpointChannelFactory; -import com.palantir.dialogue.PlainSerDe; import com.palantir.dialogue.Request; import com.palantir.dialogue.TypeMarker; import java.lang.Boolean; @@ -32,8 +31,6 @@ public interface EmptyPathServiceAsync { */ static EmptyPathServiceAsync of(EndpointChannelFactory _endpointChannelFactory, ConjureRuntime _runtime) { return new EmptyPathServiceAsync() { - private final PlainSerDe _plainSerDe = _runtime.plainSerDe(); - private final EndpointChannel emptyPathChannel = _endpointChannelFactory.endpoint(DialogueEmptyPathEndpoints.emptyPath); diff --git a/conjure-java-core/src/integrationInput/java/com/palantir/product/EmptyPathServiceBlocking.java b/conjure-java-core/src/integrationInput/java/com/palantir/product/EmptyPathServiceBlocking.java index 4e8ece73e..e3c892d79 100644 --- a/conjure-java-core/src/integrationInput/java/com/palantir/product/EmptyPathServiceBlocking.java +++ b/conjure-java-core/src/integrationInput/java/com/palantir/product/EmptyPathServiceBlocking.java @@ -9,7 +9,6 @@ import com.palantir.dialogue.Endpoint; import com.palantir.dialogue.EndpointChannel; import com.palantir.dialogue.EndpointChannelFactory; -import com.palantir.dialogue.PlainSerDe; import com.palantir.dialogue.Request; import com.palantir.dialogue.TypeMarker; import java.lang.Boolean; @@ -31,8 +30,6 @@ public interface EmptyPathServiceBlocking { */ static EmptyPathServiceBlocking of(EndpointChannelFactory _endpointChannelFactory, ConjureRuntime _runtime) { return new EmptyPathServiceBlocking() { - private final PlainSerDe _plainSerDe = _runtime.plainSerDe(); - private final EndpointChannel emptyPathChannel = _endpointChannelFactory.endpoint(DialogueEmptyPathEndpoints.emptyPath); diff --git a/conjure-java-core/src/integrationInput/java/com/palantir/product/EteBinaryServiceAsync.java b/conjure-java-core/src/integrationInput/java/com/palantir/product/EteBinaryServiceAsync.java index f9bac2b5c..ebee26741 100644 --- a/conjure-java-core/src/integrationInput/java/com/palantir/product/EteBinaryServiceAsync.java +++ b/conjure-java-core/src/integrationInput/java/com/palantir/product/EteBinaryServiceAsync.java @@ -64,8 +64,6 @@ public interface EteBinaryServiceAsync { */ static EteBinaryServiceAsync of(EndpointChannelFactory _endpointChannelFactory, ConjureRuntime _runtime) { return new EteBinaryServiceAsync() { - private final PlainSerDe _plainSerDe = _runtime.plainSerDe(); - private final EndpointChannel postBinaryChannel = _endpointChannelFactory.endpoint(DialogueEteBinaryEndpoints.postBinary); @@ -84,6 +82,8 @@ static EteBinaryServiceAsync of(EndpointChannelFactory _endpointChannelFactory, private final EndpointChannel getAliasedChannel = _endpointChannelFactory.endpoint(DialogueEteBinaryEndpoints.getAliased); + private final PlainSerDe _plainSerDe = _runtime.plainSerDe(); + @Override public ListenableFuture postBinary(AuthHeader authHeader, BinaryRequestBody body) { Request.Builder _request = Request.builder(); diff --git a/conjure-java-core/src/integrationInput/java/com/palantir/product/EteBinaryServiceBlocking.java b/conjure-java-core/src/integrationInput/java/com/palantir/product/EteBinaryServiceBlocking.java index 835107828..563efcb03 100644 --- a/conjure-java-core/src/integrationInput/java/com/palantir/product/EteBinaryServiceBlocking.java +++ b/conjure-java-core/src/integrationInput/java/com/palantir/product/EteBinaryServiceBlocking.java @@ -67,8 +67,6 @@ public interface EteBinaryServiceBlocking { */ static EteBinaryServiceBlocking of(EndpointChannelFactory _endpointChannelFactory, ConjureRuntime _runtime) { return new EteBinaryServiceBlocking() { - private final PlainSerDe _plainSerDe = _runtime.plainSerDe(); - private final EndpointChannel postBinaryChannel = _endpointChannelFactory.endpoint(DialogueEteBinaryEndpoints.postBinary); @@ -87,6 +85,8 @@ static EteBinaryServiceBlocking of(EndpointChannelFactory _endpointChannelFactor private final EndpointChannel getAliasedChannel = _endpointChannelFactory.endpoint(DialogueEteBinaryEndpoints.getAliased); + private final PlainSerDe _plainSerDe = _runtime.plainSerDe(); + @Override public InputStream postBinary(AuthHeader authHeader, BinaryRequestBody body) { Request.Builder _request = Request.builder(); diff --git a/conjure-java-core/src/integrationInput/java/com/palantir/product/EteServiceAsync.java b/conjure-java-core/src/integrationInput/java/com/palantir/product/EteServiceAsync.java index ff3dd8f3e..185675c95 100644 --- a/conjure-java-core/src/integrationInput/java/com/palantir/product/EteServiceAsync.java +++ b/conjure-java-core/src/integrationInput/java/com/palantir/product/EteServiceAsync.java @@ -247,8 +247,6 @@ ListenableFuture complexQueryParameters( */ static EteServiceAsync of(EndpointChannelFactory _endpointChannelFactory, ConjureRuntime _runtime) { return new EteServiceAsync() { - private final PlainSerDe _plainSerDe = _runtime.plainSerDe(); - private final EndpointChannel stringChannel = _endpointChannelFactory.endpoint(DialogueEteEndpoints.string); private final Deserializer stringDeserializer = @@ -446,6 +444,8 @@ static EteServiceAsync of(EndpointChannelFactory _endpointChannelFactory, Conjur private final Deserializer receiveListOfStringsDeserializer = _runtime.bodySerDe().emptyBodyDeserializer(); + private final PlainSerDe _plainSerDe = _runtime.plainSerDe(); + @Override public ListenableFuture string(AuthHeader authHeader) { Request.Builder _request = Request.builder(); diff --git a/conjure-java-core/src/integrationInput/java/com/palantir/product/EteServiceBlocking.java b/conjure-java-core/src/integrationInput/java/com/palantir/product/EteServiceBlocking.java index 08bc418f3..cf6ab540a 100644 --- a/conjure-java-core/src/integrationInput/java/com/palantir/product/EteServiceBlocking.java +++ b/conjure-java-core/src/integrationInput/java/com/palantir/product/EteServiceBlocking.java @@ -243,8 +243,6 @@ void complexQueryParameters( */ static EteServiceBlocking of(EndpointChannelFactory _endpointChannelFactory, ConjureRuntime _runtime) { return new EteServiceBlocking() { - private final PlainSerDe _plainSerDe = _runtime.plainSerDe(); - private final EndpointChannel stringChannel = _endpointChannelFactory.endpoint(DialogueEteEndpoints.string); private final Deserializer stringDeserializer = @@ -442,6 +440,8 @@ static EteServiceBlocking of(EndpointChannelFactory _endpointChannelFactory, Con private final Deserializer receiveListOfStringsDeserializer = _runtime.bodySerDe().emptyBodyDeserializer(); + private final PlainSerDe _plainSerDe = _runtime.plainSerDe(); + @Override public String string(AuthHeader authHeader) { Request.Builder _request = Request.builder(); diff --git a/conjure-java-core/src/main/java/com/palantir/conjure/java/services/dialogue/DefaultStaticFactoryMethodGenerator.java b/conjure-java-core/src/main/java/com/palantir/conjure/java/services/dialogue/DefaultStaticFactoryMethodGenerator.java index afeed3131..2b3df3bd4 100644 --- a/conjure-java-core/src/main/java/com/palantir/conjure/java/services/dialogue/DefaultStaticFactoryMethodGenerator.java +++ b/conjure-java-core/src/main/java/com/palantir/conjure/java/services/dialogue/DefaultStaticFactoryMethodGenerator.java @@ -64,6 +64,7 @@ import java.util.List; import java.util.Objects; import java.util.Optional; +import java.util.concurrent.atomic.AtomicBoolean; import javax.lang.model.element.Modifier; public final class DefaultStaticFactoryMethodGenerator implements StaticFactoryMethodGenerator { @@ -75,6 +76,7 @@ public final class DefaultStaticFactoryMethodGenerator implements StaticFactoryM private final ParameterTypeMapper parameterTypes; private final ReturnTypeMapper returnTypes; private final StaticFactoryMethodType methodType; + private final AtomicBoolean shouldGeneratePlainSerDe = new AtomicBoolean(false); public DefaultStaticFactoryMethodGenerator( Options options, @@ -91,14 +93,10 @@ public DefaultStaticFactoryMethodGenerator( @Override public MethodSpec generate(ServiceDefinition def) { + shouldGeneratePlainSerDe.set(false); ClassName className = getClassName(def); TypeSpec.Builder impl = TypeSpec.anonymousClassBuilder("").addSuperinterface(className); - impl.addField(FieldSpec.builder(PlainSerDe.class, PLAIN_SER_DE) - .addModifiers(Modifier.PRIVATE, Modifier.FINAL) - .initializer(CodeBlock.of("$L.plainSerDe()", StaticFactoryMethodGenerator.RUNTIME)) - .build()); - def.getEndpoints().forEach(endpoint -> { endpoint.getArgs().stream() .filter(arg -> arg.getParamType().accept(ParameterTypeVisitor.IS_BODY)) @@ -113,6 +111,13 @@ public MethodSpec generate(ServiceDefinition def) { impl.addMethod(DefaultStaticFactoryMethodGenerator.toStringMethod(className)); + if (shouldGeneratePlainSerDe.get()) { + impl.addField(FieldSpec.builder(PlainSerDe.class, PLAIN_SER_DE) + .addModifiers(Modifier.PRIVATE, Modifier.FINAL) + .initializer(CodeBlock.of("$L.plainSerDe()", StaticFactoryMethodGenerator.RUNTIME)) + .build()); + } + String javadoc = methodType.switchBy( "Creates a synchronous/blocking client for a $L service.", "Creates an " + "asynchronous/non-blocking client for a $L service."); @@ -124,6 +129,7 @@ public MethodSpec generate(ServiceDefinition def) { .addParameter(ConjureRuntime.class, StaticFactoryMethodGenerator.RUNTIME) .addCode(CodeBlock.builder().add("return $L;", impl.build()).build()) .build(); + return method; } @@ -211,9 +217,7 @@ private MethodSpec clientImpl(EndpointDefinition def) { methodBuilder.returns(returnType); CodeBlock.Builder requestParams = CodeBlock.builder(); - def.getAuth() - .map(DefaultStaticFactoryMethodGenerator::generateAuthHeader) - .ifPresent(requestParams::add); + def.getAuth().map(this::generateAuthHeader).ifPresent(requestParams::add); def.getArgs().stream() .map(param -> generateParam(def.getEndpointName().get(), param)) @@ -311,6 +315,7 @@ private CodeBlock generatePlainSerializer(String method, String key, CodeBlock a return type.accept(new Type.Visitor() { @Override public CodeBlock visitPrimitive(PrimitiveType primitiveType) { + shouldGeneratePlainSerDe.set(true); return CodeBlock.of( "$L.$L($S, $L.serialize$L($L));", "_request", @@ -388,7 +393,7 @@ private CodeBlock visitCollection(Type itemType) { }); } - private static CodeBlock generateAuthHeader(AuthType auth) { + private CodeBlock generateAuthHeader(AuthType auth) { return auth.accept(new AuthType.Visitor() { @Override public CodeBlock visitHeader(HeaderAuthType value) { @@ -401,6 +406,7 @@ public CodeBlock visitHeader(HeaderAuthType value) { @Override public CodeBlock visitCookie(CookieAuthType value) { + shouldGeneratePlainSerDe.set(true); return CodeBlock.of( "$L.putHeaderParams($S, \"$L=\" + $L.serializeBearerToken($L));", REQUEST, diff --git a/conjure-java-core/src/main/java/com/palantir/conjure/java/services/dialogue/DialogueServiceGenerator.java b/conjure-java-core/src/main/java/com/palantir/conjure/java/services/dialogue/DialogueServiceGenerator.java index 69ee79e61..a5970b7a9 100644 --- a/conjure-java-core/src/main/java/com/palantir/conjure/java/services/dialogue/DialogueServiceGenerator.java +++ b/conjure-java-core/src/main/java/com/palantir/conjure/java/services/dialogue/DialogueServiceGenerator.java @@ -67,24 +67,25 @@ public Stream generate(ConjureDefinition conjureDefinition) { TypeNameResolver typeNameResolver = typeName -> Preconditions.checkNotNull( types.get(typeName), "Referenced unknown TypeName", SafeArg.of("typeName", typeName)); - StaticFactoryMethodGenerator asyncGenerator = new DefaultStaticFactoryMethodGenerator( - options, - typeNameResolver, - parameterMapper, - new ReturnTypeMapper(returnTypes), - StaticFactoryMethodType.ASYNC); + return conjureDefinition.getServices().stream().flatMap(serviceDef -> { + StaticFactoryMethodGenerator asyncGenerator = new DefaultStaticFactoryMethodGenerator( + options, + typeNameResolver, + parameterMapper, + new ReturnTypeMapper(returnTypes), + StaticFactoryMethodType.ASYNC); - StaticFactoryMethodGenerator blockingGenerator = new DefaultStaticFactoryMethodGenerator( - options, - typeNameResolver, - parameterMapper, - new ReturnTypeMapper(returnTypes), - StaticFactoryMethodType.BLOCKING); + StaticFactoryMethodGenerator blockingGenerator = new DefaultStaticFactoryMethodGenerator( + options, + typeNameResolver, + parameterMapper, + new ReturnTypeMapper(returnTypes), + StaticFactoryMethodType.BLOCKING); - return conjureDefinition.getServices().stream() - .flatMap(serviceDef -> Stream.of( - endpoints.endpointsClass(serviceDef), - interfaceGenerator.generateBlocking(serviceDef, blockingGenerator), - interfaceGenerator.generateAsync(serviceDef, asyncGenerator))); + return Stream.of( + endpoints.endpointsClass(serviceDef), + interfaceGenerator.generateBlocking(serviceDef, blockingGenerator), + interfaceGenerator.generateAsync(serviceDef, asyncGenerator)); + }); } } diff --git a/conjure-java-core/src/test/resources/test/api/CookieServiceAsync.java.dialogue b/conjure-java-core/src/test/resources/test/api/CookieServiceAsync.java.dialogue index 0ecf2c4e5..7f4dc04c7 100644 --- a/conjure-java-core/src/test/resources/test/api/CookieServiceAsync.java.dialogue +++ b/conjure-java-core/src/test/resources/test/api/CookieServiceAsync.java.dialogue @@ -32,14 +32,14 @@ public interface CookieServiceAsync { */ static CookieServiceAsync of(EndpointChannelFactory _endpointChannelFactory, ConjureRuntime _runtime) { return new CookieServiceAsync() { - private final PlainSerDe _plainSerDe = _runtime.plainSerDe(); - private final EndpointChannel eatCookiesChannel = _endpointChannelFactory.endpoint(DialogueCookieEndpoints.eatCookies); private final Deserializer eatCookiesDeserializer = _runtime.bodySerDe().emptyBodyDeserializer(); + private final PlainSerDe _plainSerDe = _runtime.plainSerDe(); + @Override public ListenableFuture eatCookies(BearerToken token) { Request.Builder _request = Request.builder(); diff --git a/conjure-java-core/src/test/resources/test/api/CookieServiceBlocking.java.dialogue b/conjure-java-core/src/test/resources/test/api/CookieServiceBlocking.java.dialogue index d7f2ac5ed..f5e6e84a6 100644 --- a/conjure-java-core/src/test/resources/test/api/CookieServiceBlocking.java.dialogue +++ b/conjure-java-core/src/test/resources/test/api/CookieServiceBlocking.java.dialogue @@ -31,14 +31,14 @@ public interface CookieServiceBlocking { */ static CookieServiceBlocking of(EndpointChannelFactory _endpointChannelFactory, ConjureRuntime _runtime) { return new CookieServiceBlocking() { - private final PlainSerDe _plainSerDe = _runtime.plainSerDe(); - private final EndpointChannel eatCookiesChannel = _endpointChannelFactory.endpoint(DialogueCookieEndpoints.eatCookies); private final Deserializer eatCookiesDeserializer = _runtime.bodySerDe().emptyBodyDeserializer(); + private final PlainSerDe _plainSerDe = _runtime.plainSerDe(); + @Override public void eatCookies(BearerToken token) { Request.Builder _request = Request.builder(); diff --git a/conjure-java-core/src/test/resources/test/api/TestServiceAsync.java.dialogue b/conjure-java-core/src/test/resources/test/api/TestServiceAsync.java.dialogue index 288d542f4..60db258fc 100644 --- a/conjure-java-core/src/test/resources/test/api/TestServiceAsync.java.dialogue +++ b/conjure-java-core/src/test/resources/test/api/TestServiceAsync.java.dialogue @@ -204,8 +204,6 @@ public interface TestServiceAsync { */ static TestServiceAsync of(EndpointChannelFactory _endpointChannelFactory, ConjureRuntime _runtime) { return new TestServiceAsync() { - private final PlainSerDe _plainSerDe = _runtime.plainSerDe(); - private final EndpointChannel getFileSystemsChannel = _endpointChannelFactory.endpoint(DialogueTestEndpoints.getFileSystems); @@ -338,6 +336,8 @@ public interface TestServiceAsync { private final Deserializer getForStringsDeserializer = _runtime.bodySerDe().emptyBodyDeserializer(); + private final PlainSerDe _plainSerDe = _runtime.plainSerDe(); + @Override public ListenableFuture> getFileSystems(AuthHeader authHeader) { Request.Builder _request = Request.builder(); diff --git a/conjure-java-core/src/test/resources/test/api/TestServiceAsync.java.dialogue.prefix b/conjure-java-core/src/test/resources/test/api/TestServiceAsync.java.dialogue.prefix index 9043582c8..250b922e3 100644 --- a/conjure-java-core/src/test/resources/test/api/TestServiceAsync.java.dialogue.prefix +++ b/conjure-java-core/src/test/resources/test/api/TestServiceAsync.java.dialogue.prefix @@ -204,8 +204,6 @@ public interface TestServiceAsync { */ static TestServiceAsync of(EndpointChannelFactory _endpointChannelFactory, ConjureRuntime _runtime) { return new TestServiceAsync() { - private final PlainSerDe _plainSerDe = _runtime.plainSerDe(); - private final EndpointChannel getFileSystemsChannel = _endpointChannelFactory.endpoint(DialogueTestEndpoints.getFileSystems); @@ -338,6 +336,8 @@ public interface TestServiceAsync { private final Deserializer getForStringsDeserializer = _runtime.bodySerDe().emptyBodyDeserializer(); + private final PlainSerDe _plainSerDe = _runtime.plainSerDe(); + @Override public ListenableFuture> getFileSystems(AuthHeader authHeader) { Request.Builder _request = Request.builder(); diff --git a/conjure-java-core/src/test/resources/test/api/TestServiceBlocking.java.dialogue b/conjure-java-core/src/test/resources/test/api/TestServiceBlocking.java.dialogue index 15012aca5..fa21718e3 100644 --- a/conjure-java-core/src/test/resources/test/api/TestServiceBlocking.java.dialogue +++ b/conjure-java-core/src/test/resources/test/api/TestServiceBlocking.java.dialogue @@ -202,8 +202,6 @@ public interface TestServiceBlocking { */ static TestServiceBlocking of(EndpointChannelFactory _endpointChannelFactory, ConjureRuntime _runtime) { return new TestServiceBlocking() { - private final PlainSerDe _plainSerDe = _runtime.plainSerDe(); - private final EndpointChannel getFileSystemsChannel = _endpointChannelFactory.endpoint(DialogueTestEndpoints.getFileSystems); @@ -336,6 +334,8 @@ public interface TestServiceBlocking { private final Deserializer getForStringsDeserializer = _runtime.bodySerDe().emptyBodyDeserializer(); + private final PlainSerDe _plainSerDe = _runtime.plainSerDe(); + @Override public Map getFileSystems(AuthHeader authHeader) { Request.Builder _request = Request.builder(); diff --git a/conjure-java-core/src/test/resources/test/api/TestServiceBlocking.java.dialogue.prefix b/conjure-java-core/src/test/resources/test/api/TestServiceBlocking.java.dialogue.prefix index 092bb709b..0e1812268 100644 --- a/conjure-java-core/src/test/resources/test/api/TestServiceBlocking.java.dialogue.prefix +++ b/conjure-java-core/src/test/resources/test/api/TestServiceBlocking.java.dialogue.prefix @@ -202,8 +202,6 @@ public interface TestServiceBlocking { */ static TestServiceBlocking of(EndpointChannelFactory _endpointChannelFactory, ConjureRuntime _runtime) { return new TestServiceBlocking() { - private final PlainSerDe _plainSerDe = _runtime.plainSerDe(); - private final EndpointChannel getFileSystemsChannel = _endpointChannelFactory.endpoint(DialogueTestEndpoints.getFileSystems); @@ -336,6 +334,8 @@ public interface TestServiceBlocking { private final Deserializer getForStringsDeserializer = _runtime.bodySerDe().emptyBodyDeserializer(); + private final PlainSerDe _plainSerDe = _runtime.plainSerDe(); + @Override public Map getFileSystems(AuthHeader authHeader) { Request.Builder _request = Request.builder();