get请求1:NSURL*url = [NSURLURLWithString:@"http://127.0.0.1/demo.json"]; NSURLRequest *request = [NSURLRequest requestWithURL:url cachePolicy:1 timeoutI...
分类:
移动开发 时间:
2015-09-23 21:09:05
阅读次数:
225
NSString * path = @"http://10.0.8.8/sns/my/user_list.php"; NSURL * url = [NSURL URLWithString:path]; NSURLRequest * request = [NSURLRequ...
分类:
其他好文 时间:
2015-09-22 21:50:25
阅读次数:
117
除苹果提供的NSURLConnection和NSURLRequest外第三方的网络框架1 安装和配置MKNetworkKit框架 下载并打开MKNetworkKit目录添加MKNetworkKit文件夹到新工程中-添加支持的类库或框架 CFNetwork.framework SystemConfig...
分类:
移动开发 时间:
2015-09-20 16:09:08
阅读次数:
258
第三方网络请求库* 我们在对网络请求的时候,可以使用系统为我们提供的NSURLRequest和NSURLConnection,它基本能实现我们的基本功能。* 但是有时我们使用第三方封装的库,可以轻易实现使用系统方法比较难以实现的功能。* 常见的第三方库有:ASIHTTPRequest, AFNetw...
分类:
移动开发 时间:
2015-09-19 12:12:36
阅读次数:
177
能够获取文件的 MIMEType.{ 上传文件的时候,需要告诉服务器文件类型(即Content-Type),这时,需要获取文件的 MIMEType. 获取文件的 MIMEType 方法:加载文件时,通过 response 获得 { NSURLRequest *request = [NS...
分类:
其他好文 时间:
2015-09-15 10:39:51
阅读次数:
85
- (void)getServerDataWithUrlString:(NSString *)urlString{ // 1. 创建请求 NSURL *url = [NSURL URLWithString:urlString]; NSURLRequest *request = [NSURLR...
分类:
其他好文 时间:
2015-09-14 21:06:46
阅读次数:
139
手思中有这么一段代码,初看下,让人摸不着头脑//功能:UIWebView响应长按事件-(BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWeb...
分类:
Web程序 时间:
2015-09-11 15:49:16
阅读次数:
160
一、传统的下载文件的方式 - (void)downloaderWithUrl:(NSURL *)url{ NSURLRequest *request = [NSURLRequest requestWithURL:url]; [NSURLConnection sendAsynch...
分类:
移动开发 时间:
2015-08-21 22:56:03
阅读次数:
184
swift发起网络请求自然有他自己的处理类NSURLRequest。这个跟android中httpClient的作用都是一样的。因此本篇博客只是记录一下这个过程,代码比较简单。import UIKitprotocol HttpProtocol{
func didRecieveResults(results:NSDictionary)
}class HttpController: NSObje...
分类:
编程语言 时间:
2015-08-21 11:28:35
阅读次数:
166
OverviewNSURLRequestobjects represent a URL load request in a manner independent of protocol and URL scheme.NSURLRequest encapsulates two basic data e...
分类:
Web程序 时间:
2015-08-19 16:27:30
阅读次数:
224