Skip to content
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

Custom Header and Response Status Check #18

Merged
merged 7 commits into from
Jan 11, 2024

Conversation

tatashidayat
Copy link
Contributor

Hi @OutdatedGuy,
I found that this package is awesome, but in my usecase I need custom headers and response callback to determine the connection status.

So I think it would be great to add those to this package.

Please help to review it.

Add ReponseStatusFn to determine request status
Copy link
Owner

@OutdatedGuy OutdatedGuy left a comment

Choose a reason for hiding this comment

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

Yo @tatashidayat, thanks for this PR. It looks good on the logic and is working properly.

I just need a few necessary changes mentioned below.

lib/src/internet_check_option.dart Show resolved Hide resolved
lib/src/internet_check_option.dart Outdated Show resolved Hide resolved
lib/src/internet_check_option.dart Outdated Show resolved Hide resolved
lib/src/internet_connection.dart Outdated Show resolved Hide resolved
lib/src/internet_connection.dart Outdated Show resolved Hide resolved
test/__mocks__/test_http_client.dart Outdated Show resolved Hide resolved
test/internet_connection_test.dart Outdated Show resolved Hide resolved
test/internet_connection_test.dart Show resolved Hide resolved
@OutdatedGuy
Copy link
Owner

Hi @tatashidayat, do you plan to follow up on this PR?

@tatashidayat
Copy link
Contributor Author

tatashidayat commented Jan 11, 2024

Hi @OutdatedGuy, I haven't seen this PR for a while.

Let me address some comments.

* add doc on ResponseStatusFn typedef
* add default responseStatusFn
* add constructor header default  value
Copy link
Owner

@OutdatedGuy OutdatedGuy left a comment

Choose a reason for hiding this comment

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

LGTM!

@OutdatedGuy OutdatedGuy merged commit acec1e6 into OutdatedGuy:main Jan 11, 2024
2 checks passed
@OutdatedGuy OutdatedGuy mentioned this pull request Jan 11, 2024
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.

2 participants