NBMResponse Class Reference
Inherits from | NSObject |
---|---|
Conforms to | NBMMessage |
Declared in | NBMResponse.h |
result
The result, which can be of any JSON type (NSNumber
, NSString
, NSDictionary
, NSArray
or nil
), is returned if the request was successful.
It’s nil
if the request failed.
@property (nonatomic, readonly) id result
Declared In
NBMResponse.h
error
An NBMResponseError
object that is returned if the request failed. It’s nil
if the request was successful.
@property (nonatomic, readonly) NBMResponseError *error
Declared In
NBMResponse.h
responseId
The request identifier echoed back to the caller.
@property (nonatomic, readonly) NSNumber *responseId
Declared In
NBMResponse.h
+ responseWithResult:responseId:
Creates a new JSON-RPC 2.0 response to a successful request.
+ (instancetype)responseWithResult:(id)result responseId:(NSNumber *)responseId
Parameters
result |
The result. The value can map to any JSON type. May be |
---|---|
responseId |
The request identifier echoed back to the caller. |
Return Value
A JSON-RPC-encoded response.
Declared In
NBMResponse.h
+ responseWithError:responseId:
Creates a new JSON-RPC 2.0 response to a failed request.
+ (instancetype)responseWithError:(id)error responseId:(NSNumber *)responseId
Parameters
error |
The error value indicating the cause of the failure. |
---|---|
responseId |
The request identifier echoed back to the caller. May be |
Return Value
A JSON-RPC-encoded response.
Declared In
NBMResponse.h