Support sending and retrieving caching headers in requests/responses#15
Merged
Conversation
Breaking changes: + Rename "ApiModule" to "Api". + Change "Api#provideEngelsystemService" parameter from "okHttpClient: OkHttpClient" to "callFactory: Call.Factory". + Require "baseUrl" parameter in "Api#provideEngelsystemService" not to be empty string. + Apps need to adapt!
+ Add `eTag` and `lastModifiedAt` parameters. + Expose `retrofit2.Response` in library API. + This is a breaking change. Apps need to adapt!
Test Results14 tests ±0 14 ✅ ±0 2s ⏱️ ±0s Results for commit 47e5297. ± Comparison against base commit 99af090. This pull request removes 2 and adds 2 tests. Note that renamed tests count towards both. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
If-None-MatchandIf-Modified-Sinceat a request and get the HTTP headersETagandLast-Modifiedfrom a response. This allows to reduce the transferred data to a minimum due to the support ofHTTP 304 Not Modified.Description
EngelsystemService#getShiftsreturnResponse<List<Shift>>.eTagandlastModifiedAtparameters.retrofit2.Responsein library API.Apiin general.ApiModuletoApi.Api#provideEngelsystemServiceparameter fromokHttpClient: OkHttpClienttocallFactory: Call.Factory.baseUrlparameter inApi#provideEngelsystemServicenot to be empty string.Related