StreamHttpClient class
This is where we configure the base url, headers, query parameters and convenient methods for http verbs with error parsing.
Constructors
-
StreamHttpClient(String apiKey, {Dio? dio, StreamHttpClientOptions? options, TokenManager? tokenManager, ConnectionIdManager? connectionIdManager, SystemEnvironmentManager? systemEnvironmentManager, Logger? logger, Iterable<
Interceptor> ? interceptors, HttpClientAdapter? httpClientAdapter}) - StreamHttpClient constructor
Properties
- apiKey → String
-
Your project Stream Chat api key.
Find your API keys here https://getstream.io/dashboard/
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- httpClient → Dio
-
DiohttpClient It's been chosen because it's easy to use and supports interesting features out of the box (Interceptors, Global configuration, FormData, File downloading etc.)final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
close(
{bool force = false}) → void - Shuts down the StreamHttpClient.
-
delete<
T> (String path, {Map< String, Object?> ? queryParameters, Map<String, Object?> ? headers, CancelToken? cancelToken}) → Future<Response< T> > - Handy method to make http DELETE request with error parsing.
-
fetch<
T> (RequestOptions requestOptions) → Future< Response< T> > - Handy method to make http requests from RequestOptions with error parsing.
-
get<
T> (String path, {Map< String, Object?> ? queryParameters, Map<String, Object?> ? headers, ProgressCallback? onReceiveProgress, CancelToken? cancelToken}) → Future<Response< T> > - Handy method to make http GET request with error parsing.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
patch<
T> (String path, {Object? data, Map< String, Object?> ? queryParameters, Map<String, Object?> ? headers, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, CancelToken? cancelToken}) → Future<Response< T> > - Handy method to make http PATCH request with error parsing.
-
post<
T> (String path, {Object? data, Map< String, Object?> ? queryParameters, Map<String, Object?> ? headers, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, CancelToken? cancelToken}) → Future<Response< T> > - Handy method to make http POST request with error parsing.
-
postFile<
T> (String path, MultipartFile file, {Map< String, Object?> ? queryParameters, Map<String, Object?> ? headers, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, CancelToken? cancelToken}) → Future<Response< T> > - Handy method to post files with error parsing.
-
put<
T> (String path, {Object? data, Map< String, Object?> ? queryParameters, Map<String, Object?> ? headers, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, CancelToken? cancelToken}) → Future<Response< T> > - Handy method to make http PUT request with error parsing.
-
request<
T> (String path, {Object? data, Map< String, Object?> ? queryParameters, Options? options, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, CancelToken? cancelToken}) → Future<Response< T> > - Handy method to make generic http request with error parsing.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited