RQHTTPService+RQPostEamilInfo.m 885 B

12345678910111213141516171819202122232425262728
  1. //
  2. // RQHTTPService+RQPostEamilInfo.m
  3. // SDJK
  4. //
  5. // Created by 张嵘 on 2022/7/1.
  6. //
  7. #import "RQHTTPService+RQPostEamilInfo.h"
  8. @implementation RQHTTPService (RQPostEamilInfo)
  9. /**
  10. 发送邮件
  11. @return Returns a signal which will send complete, or error.
  12. */
  13. - (RACSignal *)postEmailInfoWithAddress:(NSString *)address dictCode:(NSInteger)dictCode {
  14. /// 1. 配置参数
  15. RQKeyedSubscript *subscript = [RQKeyedSubscript subscript];
  16. subscript[@"address"] = address;
  17. subscript[@"dictCode"] = @(dictCode);
  18. /// 2. 配置参数模型
  19. RQURLParameters *paramters = [RQURLParameters urlParametersWithMethod:RQ_HTTTP_METHOD_POST path:RQ_POST_EmailInfo parameters:subscript.dictionary];
  20. /// 3.发起请求
  21. return [[[RQHTTPRequest requestWithParameters:paramters]
  22. enqueueResultClass:[RQBaseModel class]]
  23. rq_parsedResults];
  24. }
  25. @end