Skip to content

Conversation

@petergaal91
Copy link
Contributor

@petergaal91 petergaal91 commented Feb 9, 2026

Checklist

  • This PR includes a change that:
    • Fixes a bug (non-breaking change)
    • Adds a new feature (non-breaking change)
    • Introduces a breaking change (fix or feature that would cause existing functionality to change)
  • I have reviewed the documentation and updated the relevant sections.
  • I have reviewed the tests and added or corrected them as necessary.

@petergaal91 petergaal91 requested a review from a team as a code owner February 9, 2026 13:14
Comment on lines +73 to +77
// Try to parse response body as URL first, fall back to realUri
try {
redirectUri = Uri.parse(response.body.toString());
} catch (_) {
redirectUri = response.realUri!;
Copy link
Contributor

Choose a reason for hiding this comment

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

This pattern appears multiple times. There is sdk-native HttpResponse class. A computed property (getter) could easily be created to query for the redirect URL.

This would simplify and shorten code:

final redirectUri = response.redirectChainFinalUri;

Check if HttpResponse.realUri could be made library private when a getter is introduced.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants