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

docs: invalid use of Uri.https in readme #3676

Closed
Luckey-Elijah opened this issue Jul 25, 2024 · 1 comment · Fixed by #3677
Closed

docs: invalid use of Uri.https in readme #3676

Luckey-Elijah opened this issue Jul 25, 2024 · 1 comment · Fixed by #3677
Assignees
Labels
documentation Improvements or additions to documentation needs triage

Comments

@Luckey-Elijah
Copy link
Contributor

Luckey-Elijah commented Jul 25, 2024

The README has the following snippet

@riverpod
Future<String> boredSuggestion(BoredSuggestionRef ref) async {
  final response = await http.get(
    Uri.https('https://boredapi.com/api/activity'),
  );
  final json = jsonDecode(response.body);
  return json['activity']! as String;
}

which is invalid use of Uri.https... likely should just be Uri.parse instead

@riverpod
Future<String> boredSuggestion(BoredSuggestionRef ref) async {
  final response = await http.get(
-   Uri.https('https://boredapi.com/api/activity'),
+   Uri.parse('https://boredapi.com/api/activity'),
  );
  final json = jsonDecode(response.body);
  return json['activity']! as String;
}

and the Bored-API used in the docs (and README) is down drewthoennes/Bored-API#83. I think it has been for about a month.

@Luckey-Elijah Luckey-Elijah added documentation Improvements or additions to documentation needs triage labels Jul 25, 2024
@Luckey-Elijah
Copy link
Contributor Author

Okay i see #3645 covers issues with BoredAPI, updating this issue in a moment

@Luckey-Elijah Luckey-Elijah changed the title BoredAPI is down and invalid use of Uri.https in readme docs: invalid use of Uri.https in readme Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation needs triage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants