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

RestClient for http -> Uri.https was destroying URL #108

Open
DariosKrimsKrams opened this issue Jul 2, 2021 · 0 comments
Open

RestClient for http -> Uri.https was destroying URL #108

DariosKrimsKrams opened this issue Jul 2, 2021 · 0 comments

Comments

@DariosKrimsKrams
Copy link

When I changed to RestClient (rest_client.dart), I run into an issue (because URL could not build correctly):

[ERROR:flutter/lib/ui/ui_dart_state.cc(199)] Unhandled Exception: FormatException: Invalid radix-10 number (at character 1)

I could solve it by changing rest_client.dart get-method line 14 from:

return http.get(Uri.https(Endpoints.baseUrl, path)).then(_createResponse);

to

return http.get(Uri.parse(path)).then(_createResponse);

Then it's working: Loading list of posts correctly :)

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

No branches or pull requests

1 participant