Skip to content

Commit ba231d0

Browse files
Added default Accept header to introspection query (#6616)
1 parent 65dd7a4 commit ba231d0

File tree

1 file changed

+2
-1
lines changed
  • libraries/apollo-tooling/src/main/kotlin/com/apollographql/apollo/tooling

1 file changed

+2
-1
lines changed

libraries/apollo-tooling/src/main/kotlin/com/apollographql/apollo/tooling/SchemaHelper.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,9 @@ internal object SchemaHelper {
5353
headers: Map<String, String>,
5454
insecure: Boolean,
5555
): String {
56+
val defaultHeaders = listOf(HttpHeader("Accept", "application/graphql-response+json, application/json"))
5657
val httpRequest = HttpRequest.Builder(HttpMethod.Post, endpoint)
57-
.headers(headers.map { HttpHeader(it.key, it.value) })
58+
.headers(defaultHeaders + headers.map { HttpHeader(it.key, it.value) })
5859
.body(httpBody)
5960
.build()
6061
val httpEngine = DefaultHttpEngine(newOkHttpClient(insecure))

0 commit comments

Comments
 (0)