偷偷摘套内射激情视频,久久精品99国产国产精,中文字幕无线乱码人妻,中文在线中文a,性爽19p

iPhone應(yīng)用ASIFormDataRequest POST操作架構(gòu)設(shè)計

移動開發(fā) iOS
本文介紹的是ASIFormDataRequest POST操作架構(gòu)設(shè)計,主要介紹了架構(gòu)的設(shè)計,文中有很詳細(xì)的講解,來看內(nèi)容。

iPhone應(yīng)用ASIFormDataRequest POST操作架構(gòu)設(shè)計是本文要介紹的內(nèi)容,教你如何學(xué)習(xí)iphone應(yīng)用開發(fā)架構(gòu)的設(shè)計。不多說,來看詳細(xì)內(nèi)容。

//開啟iphone網(wǎng)絡(luò)開關(guān)

  1. [UIApplication sharedApplication].networkActivityIndicatorVisible = YES;   
  2. ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURLURLWithString:host]]; 

//超時時間

  1. request.timeOutSeconds = 30;  

//定義異步方法

  1. [request setDelegate:self];  
  2. [request setDidFailSelector:@selector(requestDidFailed:)];  
  3. [request setDidFinishSelector:@selector(requestDidSuccess:)];  

//用戶自定義數(shù)據(jù)   字典類型  (可選)

  1. request.userInfo = [NSDictionary dictionaryWithObject:method forKey:@"Method"]; 

//post的數(shù)據(jù)

  1. [request appendPostData:[body dataUsingEncoding:NSUTF8StringEncoding]]; 

//開始執(zhí)行

  1. [request startAsynchronous]; 

//執(zhí)行成功

  1. - (void)requestDidSuccess:(ASIFormDataRequest *)request  

//獲取頭文件

  1. NSDictionary *headers = [request responseHeaders];  

//獲取http協(xié)議執(zhí)行代碼

  1. NSLog(@"Code:%d",[request responseStatusCode]);  
  2. if ([delegaterespondsToSelector:@selector(OARequestSuccessed:withResponse:WithData:withHeaders:)])  

//執(zhí)行委托操作  (架構(gòu)設(shè)計   自選)

  1. [delegate OARequestSuccessed:method withResponse:[request responseString]WithData:[request responseData] withHeaders:headers];  

//清空

  1. if (request)  
  2. {  
  3. [request release];  

//關(guān)閉網(wǎng)絡(luò)

  1. [UIApplication sharedApplication].networkActivityIndicatorVisible = NO;  
  2. }  

//執(zhí)行失敗

  1. - (void)requestDidFailed:(ASIFormDataRequest *)request{ 

//獲取的用戶自定義內(nèi)容

  1. NSString *method = [request.userInfo objectForKey:@"Method"]; 

小結(jié):iPhone應(yīng)用ASIFormDataRequest POST操作架構(gòu)設(shè)計的內(nèi)容介紹完了,希望通過本文的學(xué)習(xí)能對你有所幫助!

責(zé)任編輯:zhaolei 來源: 互聯(lián)網(wǎng)
相關(guān)推薦

2011-08-12 13:30:27

iPhoneASIFormData架構(gòu)

2013-05-27 10:58:28

Tumblr架構(gòu)設(shè)計雅虎收購

2010-08-10 10:10:28

系統(tǒng)架構(gòu)

2024-10-25 10:48:42

云原生云計算

2023-01-05 08:12:11

分層應(yīng)用代碼

2021-01-11 10:19:51

安全架構(gòu)

2023-07-05 08:00:52

MetrAuto系統(tǒng)架構(gòu)

2025-05-09 08:45:13

2025-04-15 04:00:00

2015-06-02 04:17:44

架構(gòu)設(shè)計審架構(gòu)設(shè)計說明書

2015-06-02 04:34:05

架構(gòu)設(shè)計

2013-09-02 17:53:41

MVC架構(gòu)設(shè)計MEF

2020-07-10 08:50:37

大數(shù)據(jù)銀行技術(shù)

2023-08-28 16:12:36

架構(gòu)微服務(wù)數(shù)字化

2011-08-17 10:24:50

iPhone開發(fā)UIImage圖片

2011-08-22 14:12:48

iPhone開發(fā)NSTableView

2012-06-07 10:45:12

軟件架構(gòu)設(shè)計原則

2021-10-28 06:17:46

架構(gòu)設(shè)計組件

2019-11-25 10:58:19

Tomcat架構(gòu)Web

2023-05-12 08:06:46

Kubernetes多云架構(gòu)
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號