-
카테고리
-
세부 분야
모바일 앱 개발
-
해결 여부
미해결
http.get 타입 문제
21.05.15 17:27 작성 조회수 186
0
final response =
await http.get('https://drf-quiz-test.herokuapp.com/quiz/3/');
The argument type 'String' can't be assigned to the parameter type 'Uri'.
해당 오류를 도저히 해결할 수 가 없는데, 혹시 아시는 분 있나요..
답변을 작성해보세요.
3
선두원
2021.06.10
업데이트가 되면서 http.get 메소드의 arg가 바뀐거 같습니다.
Uri 로 넣어주게 바뀐거 같네요. Uri타입으로 넣어주시면 됩니다.
Uri.parse('https://drf-quiz-test.herokuapp.com/quiz/3/')
를 기존 String 대신 넣어주시면 됩니다.
final response = await http.get(Uri.parse('https://drf-quiz-test.herokuapp.com/quiz/3/'));
로 변경하시면 됩니다.
0
답변 2