Skip to content

implement request factory #176

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

Merged
merged 2 commits into from
Jun 30, 2023
Merged

implement request factory #176

merged 2 commits into from
Jun 30, 2023

Conversation

wenxi-zeng
Copy link
Contributor

No description provided.

@wenxi-zeng wenxi-zeng requested a review from didiergarcia June 29, 2023 21:26
@codecov-commenter
Copy link

codecov-commenter commented Jun 29, 2023

Codecov Report

Patch coverage: 88.13% and project coverage change: -0.11 ⚠️

Comparison is base (86a4efa) 79.09% compared to head (7e743da) 78.99%.

Additional details and impacted files
@@             Coverage Diff              @@
##               main     #176      +/-   ##
============================================
- Coverage     79.09%   78.99%   -0.11%     
- Complexity      481      483       +2     
============================================
  Files            76       76              
  Lines          6334     6379      +45     
  Branches        785      785              
============================================
+ Hits           5010     5039      +29     
- Misses          689      706      +17     
+ Partials        635      634       -1     
Impacted Files Coverage Δ
...m/segment/analytics/kotlin/core/HTTPClientTests.kt 86.36% <78.26%> (-4.34%) ⬇️
...va/com/segment/analytics/kotlin/core/HTTPClient.kt 72.61% <93.33%> (-10.46%) ⬇️
...com/segment/analytics/kotlin/core/Configuration.kt 94.44% <100.00%> (+0.32%) ⬆️
...java/com/segment/analytics/kotlin/core/Settings.kt 75.43% <100.00%> (ø)
...alytics/kotlin/core/compat/ConfigurationBuilder.kt 100.00% <100.00%> (ø)
...nt/analytics/kotlin/core/platform/EventPipeline.kt 96.26% <100.00%> (+0.93%) ⬆️
...ics/kotlin/core/compat/ConfigurationBuilderTest.kt 98.59% <100.00%> (+0.02%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

throw IOException("Attempted to use malformed url: $url", e)
}
val connection = requestedURL.openConnection() as HttpURLConnection
connection.connectTimeout = 15_000 // 15s
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we make these configurable? Maybe in the constructor with these values as defaults?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, it is configurable. user can always override openConnection to configure.

@wenxi-zeng wenxi-zeng merged commit b4449b1 into main Jun 30, 2023
@wenxi-zeng wenxi-zeng deleted the wenxi/request-factory branch June 30, 2023 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants