GetConnect is highly customizable You can define base Url, as answer modifiers, as Requests modifiers, define an authenticator, and even the number of attempts in which it will try to authenticate itself, in addition to giving the possibility to define a standard decoder that will transform all your requests into your Models without any additional configuration.
```dart
classHomeProviderextendsGetConnect{
@override
voidonInit(){
// All request will pass to jsonEncode so CasesModel.fromJson()
httpClient.defaultDecoder=CasesModel.fromJson;
httpClient.baseUrl='https://api.covid19api.com';
// baseUrl = 'https://api.covid19api.com'; // It define baseUrl to
// Http and websockets if used with no [httpClient] instance
// It's will attach 'apikey' property on header from all requests
httpClient.addRequestModifier((request){
request.headers['apikey']='12345678';
returnrequest;
});
// Even if the server sends data from the country "Brazil",
// it will never be displayed to users, because you remove
// that data from the response, even before the response is delivered
The GetPage has now new property that takes a list of GetMiddleWare and run them in the specific order.
**Note**: When GetPage has a Middlewares, all the children of this page will have the same middlewares automatically.
### Priority
The Order of the Middlewares to run can pe set by the priority in the GetMiddleware.
```dart
finalmiddlewares=[
GetMiddleware(priority:2),
GetMiddleware(priority:5),
GetMiddleware(priority:4),
GetMiddleware(priority:-8),
];
```
those middlewares will be run in this order **-8 => 2 => 4 => 5**
### Redirect
This function will be called when the page of the called route is being searched for. It takes RouteSettings as a result to redirect to. Or give it null and there will be no redirecting.
This function will be called right after the GetPage.page function is called and will give you the result of the function. and take the widget that will be showed.
### OnPageDispose
This function will be called right after disposing all the related objects (Controllers, views, ...) of the page.
## 기타 고급 API
```dart
...
...
@@ -733,7 +896,7 @@ print( user );
Widgetbuild(BuildContextcontext){
returnContainer(
padding:EdgeInsets.all(20),
child:Text(controller.title),// 단지 `controller.something`을 호출합니다.
child:Text(controller.title),// 단지 `controller.something`을 호출합니다.