RhttpCompatibleClient.createSync constructor
RhttpCompatibleClient.createSync({
- ClientSettings? settings,
- List<
Interceptor> ? interceptors,
Creates a new HTTP client synchronously. Use this method if your app is starting up to simplify the code that might arise by using async/await.
Note: This method crashes when configured to use HTTP/3. See: https://github.com/Tienisto/rhttp/issues/10
Implementation
factory RhttpCompatibleClient.createSync({
ClientSettings? settings,
List<Interceptor>? interceptors,
}) {
final client = RhttpClient.createSync(
settings: (settings ?? const ClientSettings()).digest(),
interceptors: interceptors,
);
return RhttpCompatibleClient._(client);
}