You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
UrlRequestMatcher and MatchesRequest on RequestOptions ignore Dio's baseUrl and compare against path instead of uri.
Steps to reproduce
test('should match baseUrl', () async {
// arrange
final tDio = Dio();
final tDioAdapter = DioAdapter(dio: tDio);
tDioAdapter.onGet(
'http://example.com/foo/bar', (server) => server.reply(200, 'yey'));
// act
tDio.options.baseUrl = 'http://example.com/foo/';
// final result = await tDio.get('http://example.com/foo/bar'); // this works
final result = await tDio.get('bar'); // this fails
// assert
expect(result.data, 'yey');
});
Expected behavior
baseUrl is considered in route matching.
The text was updated successfully, but these errors were encountered:
Description
UrlRequestMatcher
andMatchesRequest on RequestOptions
ignore Dio'sbaseUrl
and compare againstpath
instead ofuri
.Steps to reproduce
Expected behavior
baseUrl is considered in route matching.
The text was updated successfully, but these errors were encountered: