<meter id="pryje"><nav id="pryje"><delect id="pryje"></delect></nav></meter>
          <label id="pryje"></label>

          新聞中心

          EEPW首頁 > 嵌入式系統(tǒng) > 設(shè)計應(yīng)用 > iOS開發(fā)常用的第三方類庫

          iOS開發(fā)常用的第三方類庫

          作者: 時間:2016-10-08 來源:網(wǎng)絡(luò) 收藏
          3
          4
          5
          6
          7
          8
          9
          10
          11
          12
          13
          NSURL *url = [NSURL URLWithString:@ http://allseeing-i.com ];
          __block ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:url];
          [request setCompletionBlock:^{
          // Use when fetching text data
          NSString *responseString = [request responseString];
          // Use when fetching binary data
          NSData *responseData = [request responseData];
          }];
          [request setFailedBlock:^{
          NSError *error = [request error];
          }];
          [request startAsynchronous];

          它的ASIFormDataRequest子類可以橫容易的提交表單數(shù)據(jù)和文件:

          本文引用地址:http://www.ex-cimer.com/article/201610/305920.htm
          1
          2
          3
          4
          5
          6
          7
          8
          ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url];
          [request setPostValue:@Ben forKey:@first_name];
          [request setPostValue:@Copsey forKey:@last_name];
          // Upload a file on disk
          [request setFile:@/Users/ben/Desktop/ben.jpg withFileName:@myphoto.jpg andContentType:@image/jpeg
          forKey:@photo];
          // Upload an NSData instance
          [request setData:imageData withFileName:@myphoto.jpg andContentType:@image/jpeg forKey:@photo];



          關(guān)鍵詞:

          評論


          相關(guān)推薦

          技術(shù)專區(qū)

          關(guān)閉
          看屁屁www成人影院,亚洲人妻成人图片,亚洲精品成人午夜在线,日韩在线 欧美成人 (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })();