ApiRequest class final

Represents an API request to be sent to Algolia.

This class encapsulates the HTTP method, path, read/write type, headers, query parameters, and body for a request to the Algolia API.

Constructors

ApiRequest({required RequestMethod method, required String path, bool isRead = false, Map<String, dynamic>? headers, Map<String, dynamic>? queryParams, dynamic body})
Constructs an ApiRequest with the provided method, path, read/write type, headers, query parameters, and body.
const

Properties

body → dynamic
The body of the request. May be null, in which case no body will be sent.
final
hashCode int
The hash code for this object.
no setterinherited
headers Map<String, dynamic>?
The headers for the request. May be null, in which case no custom headers will be sent.
final
isRead bool
A boolean value indicating whether the request is a read operation. If false, the request is a write operation.
final
method RequestMethod
The HTTP method for the request.
final
path String
The path for the request, relative to the base URL.
final
queryParams Map<String, dynamic>?
The query parameters for the request. May be null, in which case no query parameters will be sent.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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