一般步骤都是如下:
NSString* url = [tmp stringByAddingPercentEscapesUsingEncoding: NSUTF8StringEncoding];
NSURLRequest* request = [NSURLRequest requestWithURL:[NSURL URLWithString:url] cachePolicy:NSURLRequestReloadIgnoringCacheData timeoutInterval:20.0f];
[ request setHTTPMethod:"POST"];
[ request setHTTPBody: mData];
NSURLConnection* urlConnection = [[NSURLConnection alloc] initWithRequest:request delegate:self];
[urlConnection start];
然后实现didReceiveResponse ,didReceiveData 等等。
那么ios客户端如果再想向服务端发送数据该如何发送呢?难道还要重新建立一个连接?用这个旧的连接改如何发送呢?
NSString* url = [tmp stringByAddingPercentEscapesUsingEncoding: NSUTF8StringEncoding];
NSURLRequest* request = [NSURLRequest requestWithURL:[NSURL URLWithString:url] cachePolicy:NSURLRequestReloadIgnoringCacheData timeoutInterval:20.0f];
[ request setHTTPMethod:"POST"];
[ request setHTTPBody: mData];
NSURLConnection* urlConnection = [[NSURLConnection alloc] initWithRequest:request delegate:self];
[urlConnection start];
然后实现didReceiveResponse ,didReceiveData 等等。
那么ios客户端如果再想向服务端发送数据该如何发送呢?难道还要重新建立一个连接?用这个旧的连接改如何发送呢?