Skip to content

Commit 6b16509

Browse files
authored
Deprecate HttpNetworkTransport.httpHeaders() (#6074)
1 parent ba2aaf1 commit 6b16509

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

libraries/apollo-runtime/src/commonMain/kotlin/com/apollographql/apollo/network/http/HttpNetworkTransport.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package com.apollographql.apollo.network.http
22

3+
import com.apollographql.apollo.annotations.ApolloDeprecatedSince
34
import com.apollographql.apollo.api.ApolloRequest
45
import com.apollographql.apollo.api.ApolloResponse
56
import com.apollographql.apollo.api.CustomScalarAdapters
@@ -303,10 +304,14 @@ private constructor(
303304
this.exposeErrorBody = exposeErrorBody
304305
}
305306

307+
@Deprecated("Use ApolloClient.Builder.addHttpHeader() instead")
308+
@ApolloDeprecatedSince(ApolloDeprecatedSince.Version.v4_0_0)
306309
fun addHttpHeader(name: String, value: String) = apply {
307310
headers.add(HttpHeader(name, value))
308311
}
309312

313+
@Deprecated("Use ApolloClient.Builder.httpHeader() instead")
314+
@ApolloDeprecatedSince(ApolloDeprecatedSince.Version.v4_0_0)
310315
fun httpHeaders(headers: List<HttpHeader>) = apply {
311316
// In case this builder comes from newBuilder(), remove any existing interceptor
312317
interceptors.removeAll {

0 commit comments

Comments
 (0)