강의

멘토링

커뮤니티

Inflearn Community Q&A

fourbbbb's profile image
fourbbbb

asked

[Code Factory] [Intermediate] Flutter Real Practice! State Management, Cache Management, Code Generation, GoRouter, Authentication Logic, etc. Essential Skills to Become an Intermediate!

Working with Dio onError Interceptor

중급반 섹션6 <Dio onError Interceptor 작업하기> 질문입니다.

Written on

·

429

·

Edited

-1

 

중급반 섹션6 <Dio onError Interceptor 작업하기>강의 8분 정도에 onError작업하는 과정에서

에러사항 처리하는 과정에서

refresh토큰으로 accessToken 요청경로가 아래 같은 경로로 설정하셨는데,

final isPathRefresh = err.requestOptions.path == '/auth/token';

 

restaurnatRepository 에서 baseUrl을 이렇게 설정하셨는데 강의처럼 설정하면 http로 시작안하면 baseUrl이 온다고 나와있어서

'http://$ip/restaurant'
/// If the `path` starts with 'http(s)', the `baseURL` will be ignored, otherwise,
/// it will be combined and then resolved with the baseUrl.

'http://$ip/restaurant/auth/token'이 이렇게 되는게 아닌지 궁금합니다.

 

 

+그리고 Riverpod pdf자료 추가 안되어있는거 같은데 이것도 확인한번부탁드릴게요~ㅎ

 

flutter하이브리드-앱

Answer 1

2

codefactory님의 프로필 이미지
codefactory
Instructor

안녕하세요!

path의 경우 URL에서의 경로만을 의미합니다.

http://xxx.yyy.zzz/path/to/url

이렇게 URL이 정의 될 경우 path는 /path/to/url 이 해당됩니다.

이 질문이 맞을까요?

Riverpod 자료는 Riverpod 섹션에 추가 해두었습니다!

감사합니다!

fourbbbb님의 프로필 이미지
fourbbbb
Questioner

비슷한 질문이었습니다. 답변감사합니다!!

fourbbbb's profile image
fourbbbb

asked

Ask a question