작성
·
253
·
수정됨
0
https://openapi.naver.com/v1/search/book.json
DioException [connection error]: The connection errored: The XMLHttpRequest onError callback was called. This typically indicates an error on the network layer. This indicates an error which most likely cannot be solved by the library.
이런에러가 뜨는데
flutter run -d chrome --web-browser-flag --disable-web-security
cors 우회하셔야 합니다
혹은 .vscode 폴더안에 launch.json 을 생성하셔야하는데
vscode 기준으로 왼쪽에 디버깅 들어가셔서
아래처럼 생성하시면됩니다
{
// IntelliSense를 사용하여 가능한 특성에 대해 알아보세요.
// 기존 특성에 대한 설명을 보려면 가리킵니다.
// 자세한 내용을 보려면 https://go.microsoft.com/fwlink/?linkid=830387을(를) 방문하세요.
"version": "0.2.0",
"configurations": [
{
"name": "bookreview",
"request": "launch",
"type": "dart",
"args": [
"--web-browser-flag=--disable-web-security"
]
}
]
}
다들 아시겠지만 혹시나해서 남겨봅니다