From 6b165097cd141e2ee3f9eb7696c028d3c4cccb53 Mon Sep 17 00:00:00 2001 From: Martin Bonnin Date: Wed, 24 Jul 2024 10:56:15 +0200 Subject: [PATCH] Deprecate HttpNetworkTransport.httpHeaders() (#6074) --- .../apollo/network/http/HttpNetworkTransport.kt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libraries/apollo-runtime/src/commonMain/kotlin/com/apollographql/apollo/network/http/HttpNetworkTransport.kt b/libraries/apollo-runtime/src/commonMain/kotlin/com/apollographql/apollo/network/http/HttpNetworkTransport.kt index 554c3bceedc..169fd3e42c9 100644 --- a/libraries/apollo-runtime/src/commonMain/kotlin/com/apollographql/apollo/network/http/HttpNetworkTransport.kt +++ b/libraries/apollo-runtime/src/commonMain/kotlin/com/apollographql/apollo/network/http/HttpNetworkTransport.kt @@ -1,5 +1,6 @@ package com.apollographql.apollo.network.http +import com.apollographql.apollo.annotations.ApolloDeprecatedSince import com.apollographql.apollo.api.ApolloRequest import com.apollographql.apollo.api.ApolloResponse import com.apollographql.apollo.api.CustomScalarAdapters @@ -303,10 +304,14 @@ private constructor( this.exposeErrorBody = exposeErrorBody } + @Deprecated("Use ApolloClient.Builder.addHttpHeader() instead") + @ApolloDeprecatedSince(ApolloDeprecatedSince.Version.v4_0_0) fun addHttpHeader(name: String, value: String) = apply { headers.add(HttpHeader(name, value)) } + @Deprecated("Use ApolloClient.Builder.httpHeader() instead") + @ApolloDeprecatedSince(ApolloDeprecatedSince.Version.v4_0_0) fun httpHeaders(headers: List) = apply { // In case this builder comes from newBuilder(), remove any existing interceptor interceptors.removeAll {