// // RQHTTPResponse.h // RQCommon // // Created by 张嵘 on 2018/11/16. // Copyright © 2018 张嵘. All rights reserved. // #import "RQBaseModel.h" /// 请求数据返回的状态码 typedef NS_ENUM(NSUInteger, RQHTTPResponseCode) { RQHTTPResponseCodeSuccess = 200, /// 请求成功 RQHTTPResponseCodeJSJPSuccess = 0, /// 请求成功(极速驾培) RQHTTPResponseCodeNotLogin = 401, /// 用户尚未登录 RQHTTPResponseCodeParametersVerifyFailure = 105, /// 参数验证失败 RQHTTPResponseInsufficientRequestPermissionCode = 403, /// 请求权限不足 RQHTTPResponseSystemExceptionCode = 500, /// 系统异常 RQHTTPResponseBusinessExceptionCode = 502, /// 业务异常 }; @interface RQHTTPResponse : RQBaseModel /// The parsed RQObject object corresponding to the API response. /// The developer need care this data 切记:若没有数据是NSNull 而不是nil .对应于服务器json数据的 data @property (nonatomic, readonly, strong) id parsedResult; /// 自己服务器返回的状态码 对应于服务器json数据的 code @property (nonatomic, readonly, assign) RQHTTPResponseCode code; /// 自己服务器返回的信息 对应于服务器json数据的 code @property (nonatomic, readonly, copy) NSString *msg; // Initializes the receiver with the headers from the given response, and given the origin data and the // given parsed model object(s). - (instancetype)initWithResponseObject:(id)responseObject parsedResult:(id)parsedResult; @end