NetworkRequests class

Makes an API request with the specified parameters.

uri - The URI to send the request to headers - The headers to include in the request body - Optional request body delete - Whether this is a DELETE request

Returns the parsed JSON response or null if the request fails. Throws OpensubtitlesApiException if the request fails.

Constructors

NetworkRequests()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

deleteApiRequest({required Uri uri, required Map<String, String> headers}) Future<Map<String, dynamic>?>
fetchPartialContent({required String url, required int start, required int end}) Future<Uint8List>
getApiRequest({required Uri uri, required Map<String, String> headers}) Future<Map<String, dynamic>?>
getFileSize({required String url}) Future<int?>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
postApiRequest({required Uri uri, required Map<String, String> headers, Map<String, dynamic>? body}) Future<Map<String, dynamic>?>
postRawApiRequest({required Uri uri, required Map<String, String> headers, Map<String, dynamic>? body}) Future<String?>
Makes a raw POST request to the API.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited