-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(sdk): remove retrofit and okhttp #5
Conversation
import com.topsort.analytics.model.ImpressionEvent | ||
import com.topsort.analytics.model.PurchaseEvent | ||
|
||
private const val apiUrl = "https://api.topsort.com/v1/events" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can the hostname be a project wide constant and potentially overridable? Lets say we wanna point it at a staging or test environment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll address in future PRs when we get a better testing setup
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not about tests though
TopsortAnalytics/src/test/java/com/topsort/analytics/TopsortAnalyticsHttpServiceTest.kt
Outdated
Show resolved
Hide resolved
internal fun HttpURLConnection.createPostConnection(): Connection { | ||
val encoding = getRequestProperty("Content-Encoding") ?: "" | ||
val outputStream: OutputStream = | ||
if (encoding.contains("gzip")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we additionally wanna support deflate, br here? can the http library help us in any way?
Test Bearer token AuthorizationAdd mocked testWill be in future PRs
Closes: https://topsort.atlassian.net/browse/API-796