ARTHTTPPaginatedResponse
Objective-C
@interface ARTHTTPPaginatedResponse : ARTPaginatedResult <NSDictionary *>
Swift
class ARTHTTPPaginatedResponse : ARTPaginatedResult<NSDictionary>, @unchecked Sendable
A superset of ARTPaginatedResult which represents a page of results plus metadata indicating the relative queries available to it. ARTHttpPaginatedResponse additionally carries information about the response to an HTTP request.
-
The HTTP status code of the response.
Declaration
Objective-C
@property (nonatomic, readonly) NSInteger statusCode;Swift
var statusCode: Int { get } -
Whether
statusCodeindicates success. This is equivalent to200 <= statusCode < 300.Declaration
Objective-C
@property (nonatomic, readonly) BOOL success;Swift
var success: Bool { get } -
The error code if the
x-ably-errorcodeHTTP header is sent in the response.Declaration
Objective-C
@property (nonatomic, readonly) NSInteger errorCode;Swift
var errorCode: Int { get } -
The error message if the
x-ably-errormessageHTTP header is sent in the response.Declaration
Objective-C
@property (nonatomic, readonly, nullable) NSString *errorMessage;Swift
var errorMessage: String? { get } -
The headers of the response.
Declaration
Objective-C
@property (nonatomic, readonly) NSStringDictionary *_Nonnull headers;Swift
var headers: [String : String] { get } -
Returns a new
ARTHTTPPaginatedResponsefor the first page of results.Declaration
Objective-C
- (void)first:(nonnull ARTHTTPPaginatedCallback)callback;Swift
func first(_ callback: @escaping ARTHTTPPaginatedCallback)Parameters
callbackA callback for retriving an
ARTHTTPPaginatedResponseobject with an array ofNSDictionaryobjects. -
Returns a new
ARTHTTPPaginatedResponseloaded with the next page of results. If there are no further pages, thennilis returned.Declaration
Objective-C
- (void)next:(nonnull ARTHTTPPaginatedCallback)callback;Swift
func next(_ callback: @escaping ARTHTTPPaginatedCallback)Parameters
callbackA callback for retriving an
ARTHTTPPaginatedResponseobject with an array ofNSDictionaryobjects.