[-]
AFNetworking是一个讨人喜欢的网络库,适用于iOS以及Mac OS X. 它构建于在NSURLConnection, NSOperation, 以及其他熟悉的Foundation技术之上. 它拥有良好的架构,丰富的api,以及模块化构建方式,使得使用起来非常轻松.例如,他可以使用很轻松的方式从一个url来得到json数据:
<div class="devcodeoverflow" style="border: 1px solid rgb(204, 204, 204); vertical-align: baseline; background-color: transparent; margin: 1px !important; padding: 0px !important; outline: 0px !important; overflow: auto !important; float: none !important;"><table class="devcodearea " width="100%"><tbody style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; font-size: 12px; vertical-align: baseline; background-color: transparent;"><tr style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent;"><td class="devcodelines" width="1%" style="outline: 0px; overflow: visible; vertical-align: baseline; border-width: 0px 4px 0px 0px !important; border-right-style: solid !important; border-right-color: rgb(102, 238, 102) !important; padding: 0px 5px !important; margin: 0px !important; background-color: rgb(114, 158, 185) !important; font-family: 'courier new' !important; color: rgb(255, 255, 255) !important;">1</td><td class="devcodelinesarea" style="border-right-width: 0px; padding: 0px; margin: 0px; outline: 0px; overflow: visible; vertical-align: baseline; border-bottom-width: 0px !important; border-top-width: 0px !important; border-left-width: 0px !important;"><pre class="devcode devcodeline" name="code" style="white-space: pre-wrap; word-wrap: break-word; background-color: transparent; outline: 0px; overflow: visible; vertical-align: baseline; font-family: 'courier new' !important; border: 0px !important; padding: 0px 5px !important; margin-top: 0px !important; margin-bottom: 0px !important;"><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(64, 0, 128);">NSURL</span> <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">*</span>url <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">=</span> <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">[</span><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(64, 0, 128);">NSURL</span> URLWithString<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">:</span><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(191, 29, 26);">@</span><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(191, 29, 26);">"http://api.twitter.com/1/statuses/public_timeline.json"</span><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">]</span>;2
<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(64, 0, 128);">NSURLRequest</span> <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">*</span>request <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">=</span> <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">[</span><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(64, 0, 128);">NSURLRequest</span> requestWithURL<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">:</span>url<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">]</span>;3
AFJSONRequestOperation <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">*</span>operation <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">=</span> <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">[</span>AFJSONRequestOperation JSONRequestOperationWithRequest<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">:</span>request success<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">:^</span><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">(</span><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(64, 0, 128);">NSURLRequest</span> <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">*</span>request, <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(64, 0, 128);">NSHTTPURLResponse</span> <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">*</span>response, <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(166, 19, 144);">id</span> JSON<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">)</span> <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">{</span>4
NSLog<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">(</span><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(191, 29, 26);">@</span><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(191, 29, 26);">"Public Timeline: %@"</span>, JSON<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">)</span>;5
<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">}</span> failure<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">:</span><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(166, 19, 144);">nil</span><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">]</span>;6
<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">[</span>operation start<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">]</span>;
AFURLConnectionOperation:一个 NSOperation 实现了NSURLConnection 的代理方法.
HTTP Requests:
AFHTTPRequestOperation:AFURLConnectionOperation的子类,当request使用的协议为HTTP和HTTPS时,它压缩了用于决定request是否成功的状态码和内容类型.
AFJSONRequestOperation:AFHTTPRequestOperation的一个子类,用于下载和处理jason response数据.
AFXMLRequestOperation:AFHTTPRequestOperation的一个子类,用于下载和处理xml response数据.
AFPropertyListRequestOperation:AFHTTPRequestOperation的一个子类,用于下载和处理property list response数据.
AFHTTPClient:捕获一个基于http协议的网络应用程序的公共交流模式.包含:
AFImageRequestOperation:一个AFHTTPRequestOperation的子类,用于下载和处理图片.
UIImageView+AFNetworking:添加一些方法到UIImageView中,为了从一个URL中异步加载远程图片
<div class="devcodeoverflow" style="border: 1px solid rgb(204, 204, 204); vertical-align: baseline; background-color: transparent; margin: 1px !important; padding: 0px !important; outline: 0px !important; overflow: auto !important; float: none !important;"><table class="devcodearea " width="100%"><tbody style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; font-size: 12px; vertical-align: baseline; background-color: transparent;"><tr style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent;"><td class="devcodelines" width="1%" style="outline: 0px; overflow: visible; vertical-align: baseline; border-width: 0px 4px 0px 0px !important; border-right-style: solid !important; border-right-color: rgb(102, 238, 102) !important; padding: 0px 5px !important; margin: 0px !important; background-color: rgb(114, 158, 185) !important; font-family: 'courier new' !important; color: rgb(255, 255, 255) !important;">1</td><td class="devcodelinesarea" style="border-right-width: 0px; padding: 0px; margin: 0px; outline: 0px; overflow: visible; vertical-align: baseline; border-bottom-width: 0px !important; border-top-width: 0px !important; border-left-width: 0px !important;"><pre class="devcode devcodeline" name="code" style="white-space: pre-wrap; word-wrap: break-word; background-color: transparent; outline: 0px; overflow: visible; vertical-align: baseline; font-family: 'courier new' !important; border: 0px !important; padding: 0px 5px !important; margin-top: 0px !important; margin-bottom: 0px !important;"><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(64, 0, 128);">NSURLRequest</span> <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">*</span>request <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">=</span> <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">[</span><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(64, 0, 128);">NSURLRequest</span> requestWithURL<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">:</span><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">[</span><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(64, 0, 128);">NSURL</span> URLWithString<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">:</span><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(191, 29, 26);">@</span><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(191, 29, 26);">"http://api.flickr.com/services/rest/?method=flickr.groups.browse&api_key=b6300e17ad3c506e706cb0072175d047&cat_id=34427469792%40N01&format=rest"</span><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">]</span><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">]</span>;2
AFXMLRequestOperation <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">*</span>operation <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">=</span> <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">[</span>AFXMLRequestOperation XMLParserRequestOperationWithRequest<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">:</span>request success<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">:^</span><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">(</span><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(64, 0, 128);">NSURLRequest</span> <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">*</span>request, <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(64, 0, 128);">NSHTTPURLResponse</span> <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">*</span>response, <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(64, 0, 128);">NSXMLParser</span> <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">*</span>XMLParser<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">)</span> <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">{</span>3
XMLParser.delegate <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">=</span> self;4
<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">[</span>XMLParser parse<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">]</span>;5
<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">}</span> failure<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">:</span><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(166, 19, 144);">nil</span><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">]</span>;6
<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">[</span>operation start<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">]</span>;
<div class="devcodeoverflow" style="border: 1px solid rgb(204, 204, 204); vertical-align: baseline; background-color: transparent; margin: 1px !important; padding: 0px !important; outline: 0px !important; overflow: auto !important; float: none !important;"><table class="devcodearea " width="100%"><tbody style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; font-size: 12px; vertical-align: baseline; background-color: transparent;"><tr style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent;"><td class="devcodelines" width="1%" style="outline: 0px; overflow: visible; vertical-align: baseline; border-width: 0px 4px 0px 0px !important; border-right-style: solid !important; border-right-color: rgb(102, 238, 102) !important; padding: 0px 5px !important; margin: 0px !important; background-color: rgb(114, 158, 185) !important; font-family: 'courier new' !important; color: rgb(255, 255, 255) !important;">1</td><td class="devcodelinesarea" style="border-right-width: 0px; padding: 0px; margin: 0px; outline: 0px; overflow: visible; vertical-align: baseline; border-bottom-width: 0px !important; border-top-width: 0px !important; border-left-width: 0px !important;"><pre class="devcode devcodeline" name="code" style="white-space: pre-wrap; word-wrap: break-word; background-color: transparent; outline: 0px; overflow: visible; vertical-align: baseline; font-family: 'courier new' !important; border: 0px !important; padding: 0px 5px !important; margin-top: 0px !important; margin-bottom: 0px !important;">UIImageView <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">*</span>imageView <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">=</span> <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">[</span><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">[</span>UIImageView alloc<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">]</span> initWithFrame<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">:</span>CGRectMake<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">(</span>0.0f, 0.0f, 100.0f, 100.0f<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">)</span><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">]</span>;2
<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">[</span>imageView setImageWithURL<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">:</span><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">[</span><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(64, 0, 128);">NSURL</span> URLWithString<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">:</span><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(191, 29, 26);">@</span><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(191, 29, 26);">"http://i.imgur.com/r4uwx.jpg"</span><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">]</span> placeholderImage<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">:</span><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">[</span>UIImage imageNamed<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">:</span><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(191, 29, 26);">@</span><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(191, 29, 26);">"placeholder-avatar"</span><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">]</span><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">]</span>;
<div class="devcodeoverflow" style="border: 1px solid rgb(204, 204, 204); vertical-align: baseline; background-color: transparent; margin: 1px !important; padding: 0px !important; outline: 0px !important; overflow: auto !important; float: none !important;"><table class="devcodearea " width="100%"><tbody style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; font-size: 12px; vertical-align: baseline; background-color: transparent;"><tr style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent;"><td class="devcodelines" width="1%" style="outline: 0px; overflow: visible; vertical-align: baseline; border-width: 0px 4px 0px 0px !important; border-right-style: solid !important; border-right-color: rgb(102, 238, 102) !important; padding: 0px 5px !important; margin: 0px !important; background-color: rgb(114, 158, 185) !important; font-family: 'courier new' !important; color: rgb(255, 255, 255) !important;">1</td><td class="devcodelinesarea" style="border-right-width: 0px; padding: 0px; margin: 0px; outline: 0px; overflow: visible; vertical-align: baseline; border-bottom-width: 0px !important; border-top-width: 0px !important; border-left-width: 0px !important;"><pre class="devcode devcodeline" name="code" style="white-space: pre-wrap; word-wrap: break-word; background-color: transparent; outline: 0px; overflow: visible; vertical-align: baseline; font-family: 'courier new' !important; border: 0px !important; padding: 0px 5px !important; margin-top: 0px !important; margin-bottom: 0px !important;"><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(17, 116, 10);"><em>// AFGowallaAPIClient is a subclass of AFHTTPClient, which defines the base URL and default HTTP headers for NSURLRequests it creates</em></span>2
<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">[</span><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">[</span>AFGowallaAPIClient sharedClient<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">]</span> getPath<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">:</span><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(191, 29, 26);">@</span><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(191, 29, 26);">"/spots/9223"</span> parameters<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">:</span><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(166, 19, 144);">nil</span> success<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">:^</span><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">(</span>AFHTTPRequestOperation <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">*</span>operation, <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(166, 19, 144);">id</span> responseObject<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">)</span> <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">{</span>3
NSLog<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">(</span><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(191, 29, 26);">@</span><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(191, 29, 26);">"Name: %@"</span>, <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">[</span>responseObject valueForKeyPath<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">:</span><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(191, 29, 26);">@</span><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(191, 29, 26);">"name"</span><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">]</span><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">)</span>;4
NSLog<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">(</span><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(191, 29, 26);">@</span><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(191, 29, 26);">"Address: %@"</span>, <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">[</span>responseObject valueForKeyPath<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">:</span><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(191, 29, 26);">@</span><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(191, 29, 26);">"address.street_address"</span><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">]</span><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">)</span>;5
<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">}</span> failure<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">:</span><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(166, 19, 144);">nil</span><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">]</span>;
<div class="devcodeoverflow" style="border: 1px solid rgb(204, 204, 204); vertical-align: baseline; background-color: transparent; margin: 1px !important; padding: 0px !important; outline: 0px !important; overflow: auto !important; float: none !important;"><table class="devcodearea " width="100%"><tbody style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; font-size: 12px; vertical-align: baseline; background-color: transparent;"><tr style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent;"><td class="devcodelines" width="1%" style="outline: 0px; overflow: visible; vertical-align: baseline; border-width: 0px 4px 0px 0px !important; border-right-style: solid !important; border-right-color: rgb(102, 238, 102) !important; padding: 0px 5px !important; margin: 0px !important; background-color: rgb(114, 158, 185) !important; font-family: 'courier new' !important; color: rgb(255, 255, 255) !important;">01</td><td class="devcodelinesarea" style="border-right-width: 0px; padding: 0px; margin: 0px; outline: 0px; overflow: visible; vertical-align: baseline; border-bottom-width: 0px !important; border-top-width: 0px !important; border-left-width: 0px !important;"><pre class="devcode devcodeline" name="code" style="white-space: pre-wrap; word-wrap: break-word; background-color: transparent; outline: 0px; overflow: visible; vertical-align: baseline; font-family: 'courier new' !important; border: 0px !important; padding: 0px 5px !important; margin-top: 0px !important; margin-bottom: 0px !important;"><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(64, 0, 128);">NSURL</span> <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">*</span>url <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">=</span> <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">[</span><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(64, 0, 128);">NSURL</span> URLWithString<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">:</span><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(191, 29, 26);">@</span><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(191, 29, 26);">"http://api-base-url.com"</span><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">]</span>;02
AFHTTPClient <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">*</span>httpClient <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">=</span> <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">[</span><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">[</span>AFHTTPClient alloc<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">]</span> initWithBaseURL<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">:</span>url<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">]</span>;03
<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(64, 0, 128);">NSData</span> <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">*</span>imageData <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">=</span> UIImageJPEGRepresentation<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">(</span><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">[</span>UIImage imageNamed<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">:</span><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(191, 29, 26);">@</span><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(191, 29, 26);">"avatar.jpg"</span><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">]</span>, <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(36, 0, 217);">0.5</span><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">)</span>;04
<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(64, 0, 128);">NSMutableURLRequest</span> <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">*</span>request <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">=</span> <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">[</span>httpClient multipartFormRequestWithMethod<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">:</span><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(191, 29, 26);">@</span><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(191, 29, 26);">"POST"</span> path<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">:</span><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(191, 29, 26);">@</span><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(191, 29, 26);">"/upload"</span> parameters<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">:</span><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(166, 19, 144);">nil</span> constructingBodyWithBlock<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">:</span> <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">^</span><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">(</span><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(166, 19, 144);">id</span> <AFMultipartFormData>formData<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">)</span> <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">{</span>05
<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">[</span>formData appendPartWithFileData<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">:</span>imageData name<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">:</span><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(191, 29, 26);">@</span><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(191, 29, 26);">"avatar"</span> fileName<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">:</span><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(191, 29, 26);">@</span><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(191, 29, 26);">"avatar.jpg"</span> mimeType<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">:</span><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(191, 29, 26);">@</span><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(191, 29, 26);">"image/jpeg"</span><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">]</span>;06
<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">}</span><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">]</span>;07
08
AFHTTPRequestOperation <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">*</span>operation <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">=</span> <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">[</span><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">[</span><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">[</span>AFHTTPRequestOperation alloc<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">]</span> initWithRequest<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">:</span>request<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">]</span> autorelease<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">]</span>;09
<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">[</span>operation setUploadProgressBlock<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">:^</span><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">(</span>NSInteger bytesWritten, <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(166, 19, 144);">long</span> <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(166, 19, 144);">long</span> totalBytesWritten, <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(166, 19, 144);">long</span> <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(166, 19, 144);">long</span> totalBytesExpectedToWrite<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">)</span> <span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">{</span>10
NSLog<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">(</span><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(191, 29, 26);">@</span><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(191, 29, 26);">"Sent %lld of %lld bytes"</span>, totalBytesWritten, totalBytesExpectedToWrite<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">)</span>;11
<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">}</span><span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">]</span>;12
<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">[</span>operation start<span style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent; color: rgb(0, 34, 0);">]</span>;
<div class="devcodeoverflow" style="border: 1px solid rgb(204, 204, 204); vertical-align: baseline; background-color: transparent; margin: 1px !important; padding: 0px !important; outline: 0px !important; overflow: auto !important; float: none !important;"><table class="devcodearea " width="100%"><tbody style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; font-size: 12px; vertical-align: baseline; background-color: transparent;"><tr style="margin: 0px; padding: 0px; border: 0px; outline: 0px; overflow: visible; vertical-align: baseline; background-color: transparent;"><td class="devcodelines" width="1%" style="outline: 0px; overflow: visible; vertical-align: baseline; border-width: 0px 4px 0px 0px !important; border-right-style: solid !important; border-right-color: rgb(102, 238, 102) !important; padding: 0px 5px !important; margin: 0px !important; background-color: rgb(114, 158, 185) !important; font-family: 'courier new' !important; color: rgb(255, 255, 255) !important;">1</td><td class="devcodelinesarea" style="border-right-width: 0px; padding: 0px; margin: 0px; outline: 0px; overflow: visible; vertical-align: baseline; border-bottom-width: 0px !important; border-top-width: 0px !important; border-left-width: 0px !important;"><pre class="devcode devcodeline" name="code" style="white-space: pre-wrap; word-wrap: break-word; background-color: transparent; outline: 0px; overflow: visible; vertical-align: baseline; font-family: 'courier new' !important; border: 0px !important; padding: 0px 5px !important; margin-top: 0px !important; margin-bottom: 0px !important;">NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://localhost:8080/encode"]];2
3
AFHTTPRequestOperation *operation = [[[AFHTTPRequestOperation alloc] initWithRequest:request] autorelease];4
operation.inputStream = [NSInputStream inputStreamWithFileAtPath:[[NSBundle mainBundle] pathForResource:@"large-image" ofType:@"tiff"]];5
operation.outputStream = [NSOutputStream outputStreamToMemory];6
[operation start];