Skip to content

Commit

Permalink
Adding unreleased functionality in the changelogs to keep track of cu…
Browse files Browse the repository at this point in the history
…rrent version
  • Loading branch information
Subash Pradhan committed Oct 22, 2024
1 parent 3dccd2a commit 8b8617e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Nylas Java SDK Changelog

### Unreleased
* Added support for `Accept-Encoding: gzip` in HTTP headers

### [2.5.0] - Released 2024-09-25

### Added
Expand Down
1 change: 1 addition & 0 deletions src/main/kotlin/com/nylas/NylasClient.kt
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ class NylasClient(
ACCEPT("Accept"),
AUTHORIZATION("Authorization"),
CONTENT_TYPE("Content-Type"),
ACCEPT_ENCODING("Accept-Encoding")
}

init {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ class AddVersionHeadersInterceptor : Interceptor {
override fun intercept(chain: Interceptor.Chain): Response {
val requestBuilder = chain.request().newBuilder()
.header("User-Agent", USER_AGENT)
.header("Accept-Encoding", "gzip")
return chain.proceed(requestBuilder.build())
}

Expand Down
1 change: 1 addition & 0 deletions src/test/kotlin/com/nylas/NylasClientTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,7 @@ class NylasClientTest {
assertEquals("Accept", NylasClient.HttpHeaders.ACCEPT.headerName)
assertEquals("Authorization", NylasClient.HttpHeaders.AUTHORIZATION.headerName)
assertEquals("Content-Type", NylasClient.HttpHeaders.CONTENT_TYPE.headerName)
assertEquals("Accept-Encoding", NylasClient.HttpHeaders.ACCEPT_ENCODING.headerName)
}
}
}

0 comments on commit 8b8617e

Please sign in to comment.