12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004 |
- #import <Foundation/Foundation.h>
- #if TARGET_OS_IPHONE
- #import <CFNetwork/CFNetwork.h>
- #if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_4_0
- #import <UIKit/UIKit.h> // Necessary for background task support
- #endif
- #endif
- #import <stdio.h>
- #import "ASIHTTPRequestConfig.h"
- #import "ASIHTTPRequestDelegate.h"
- #import "ASIProgressDelegate.h"
- #import "ASICacheDelegate.h"
- @class ASIDataDecompressor;
- extern NSString *ASIHTTPRequestVersion;
- #ifndef __IPHONE_3_2
- #define __IPHONE_3_2 30200
- #endif
- #ifndef __IPHONE_4_0
- #define __IPHONE_4_0 40000
- #endif
- #ifndef __MAC_10_5
- #define __MAC_10_5 1050
- #endif
- #ifndef __MAC_10_6
- #define __MAC_10_6 1060
- #endif
- typedef enum _ASIAuthenticationState {
- ASINoAuthenticationNeededYet = 0,
- ASIHTTPAuthenticationNeeded = 1,
- ASIProxyAuthenticationNeeded = 2
- } ASIAuthenticationState;
- typedef enum _ASINetworkErrorType {
- ASIConnectionFailureErrorType = 1,
- ASIRequestTimedOutErrorType = 2,
- ASIAuthenticationErrorType = 3,
- ASIRequestCancelledErrorType = 4,
- ASIUnableToCreateRequestErrorType = 5,
- ASIInternalErrorWhileBuildingRequestType = 6,
- ASIInternalErrorWhileApplyingCredentialsType = 7,
- ASIFileManagementError = 8,
- ASITooMuchRedirectionErrorType = 9,
- ASIUnhandledExceptionError = 10,
- ASICompressionError = 11
-
- } ASINetworkErrorType;
- extern NSString* const NetworkRequestErrorDomain;
- extern unsigned long const ASIWWANBandwidthThrottleAmount;
- #if NS_BLOCKS_AVAILABLE
- typedef void (^ASIBasicBlock)(void);
- typedef void (^ASIHeadersBlock)(NSDictionary *responseHeaders);
- typedef void (^ASISizeBlock)(long long size);
- typedef void (^ASIProgressBlock)(unsigned long long size, unsigned long long total);
- typedef void (^ASIDataBlock)(NSData *data);
- #endif
- @interface ASIHTTPRequest : NSOperation <NSCopying> {
-
-
- NSURL *url;
-
-
- NSURL *originalURL;
-
-
- NSURL *redirectURL;
-
- id <ASIHTTPRequestDelegate> delegate;
-
-
-
-
- id <ASIHTTPRequestDelegate, ASIProgressDelegate> queue;
-
-
- NSString *requestMethod;
-
-
- NSMutableData *postBody;
-
-
- NSData *compressedPostBody;
-
-
-
- BOOL shouldStreamPostDataFromDisk;
-
-
-
- NSString *postBodyFilePath;
-
-
- NSString *compressedPostBodyFilePath;
-
-
- BOOL didCreateTemporaryPostDataFile;
-
-
- NSOutputStream *postBodyWriteStream;
-
-
- NSInputStream *postBodyReadStream;
-
-
- NSMutableDictionary *requestHeaders;
-
-
- BOOL haveBuiltRequestHeaders;
-
-
- NSDictionary *responseHeaders;
-
-
- NSMutableArray *requestCookies;
-
-
- NSArray *responseCookies;
-
-
- BOOL useCookiePersistence;
-
-
- BOOL useKeychainPersistence;
-
-
- BOOL useSessionPersistence;
-
-
- BOOL allowCompressedResponse;
-
-
-
- BOOL shouldCompressRequestBody;
-
-
-
- NSString *downloadDestinationPath;
-
-
- NSString *temporaryFileDownloadPath;
-
-
- NSString *temporaryUncompressedDataDownloadPath;
-
-
- NSOutputStream *fileDownloadOutputStream;
-
- NSOutputStream *inflatedFileDownloadOutputStream;
-
-
- BOOL complete;
-
-
- BOOL finished;
-
-
- BOOL cancelled;
-
-
-
- NSError *error;
-
-
- NSString *username;
- NSString *password;
-
-
- NSString *userAgentString;
-
-
- NSString *domain;
-
-
- NSString *proxyUsername;
- NSString *proxyPassword;
-
-
- NSString *proxyDomain;
-
-
- id <ASIProgressDelegate> uploadProgressDelegate;
-
-
- id <ASIProgressDelegate> downloadProgressDelegate;
-
-
- BOOL haveExaminedHeaders;
-
-
- NSMutableData *rawResponseData;
-
-
- CFHTTPMessageRef request;
- NSInputStream *readStream;
-
-
- CFHTTPAuthenticationRef requestAuthentication;
- NSDictionary *requestCredentials;
-
-
- int authenticationRetryCount;
-
-
-
- NSString *authenticationScheme;
-
-
- NSString *authenticationRealm;
-
-
-
-
- BOOL shouldPresentAuthenticationDialog;
-
-
-
-
- BOOL shouldPresentProxyAuthenticationDialog;
-
-
- CFHTTPAuthenticationRef proxyAuthentication;
- NSDictionary *proxyCredentials;
-
-
- int proxyAuthenticationRetryCount;
-
-
- NSString *proxyAuthenticationScheme;
-
-
- NSString *proxyAuthenticationRealm;
-
-
- int responseStatusCode;
-
-
- NSString *responseStatusMessage;
-
-
- unsigned long long contentLength;
-
-
- unsigned long long partialDownloadSize;
-
-
- unsigned long long postLength;
-
-
- unsigned long long totalBytesRead;
-
-
- unsigned long long totalBytesSent;
-
-
- unsigned long long lastBytesRead;
-
-
- unsigned long long lastBytesSent;
-
-
- NSRecursiveLock *cancelledLock;
-
-
- SEL didStartSelector;
-
-
- SEL didReceiveResponseHeadersSelector;
-
-
- SEL willRedirectSelector;
-
- SEL didFinishSelector;
-
-
- SEL didFailSelector;
-
-
-
- SEL didReceiveDataSelector;
-
-
- NSDate *lastActivityTime;
-
-
- NSTimeInterval timeOutSeconds;
-
-
- BOOL shouldResetUploadProgress;
- BOOL shouldResetDownloadProgress;
-
-
- ASIHTTPRequest *mainRequest;
-
-
-
-
-
- BOOL showAccurateProgress;
-
-
- BOOL updatedProgress;
-
-
- BOOL haveBuiltPostBody;
-
-
-
-
- unsigned long long uploadBufferSize;
-
-
- NSStringEncoding defaultResponseEncoding;
-
-
- NSStringEncoding responseEncoding;
-
-
- BOOL allowResumeForFileDownloads;
-
-
- NSDictionary *userInfo;
- NSInteger tag;
-
-
- BOOL useHTTPVersionOne;
-
-
- BOOL shouldRedirect;
-
-
- BOOL needsRedirect;
-
-
- int redirectCount;
-
-
- BOOL validatesSecureCertificate;
-
-
- SecIdentityRef clientCertificateIdentity;
- NSArray *clientCertificates;
-
-
- NSString *proxyHost;
- int proxyPort;
-
-
-
- NSString *proxyType;
-
- NSURL *PACurl;
-
-
- ASIAuthenticationState authenticationNeeded;
-
-
-
-
-
-
-
- BOOL shouldPresentCredentialsBeforeChallenge;
-
-
- BOOL inProgress;
-
-
-
- BOOL readStreamIsScheduled;
-
-
-
- int numberOfTimesToRetryOnTimeout;
-
- int retryCount;
-
- BOOL willRetryRequest;
-
-
-
- BOOL shouldAttemptPersistentConnection;
-
-
-
-
- NSTimeInterval persistentConnectionTimeoutSeconds;
-
-
- BOOL connectionCanBeReused;
-
-
-
-
-
-
-
-
-
- NSMutableDictionary *connectionInfo;
-
-
-
- BOOL shouldUseRFC2616RedirectBehaviour;
-
-
- BOOL downloadComplete;
-
-
- NSNumber *requestID;
-
-
- NSString *runLoopMode;
-
-
- NSTimer *statusTimer;
-
-
- id <ASICacheDelegate> downloadCache;
-
-
- ASICachePolicy cachePolicy;
-
-
- ASICacheStoragePolicy cacheStoragePolicy;
-
-
- BOOL didUseCachedResponse;
-
- NSTimeInterval secondsToCache;
- #if TARGET_OS_IPHONE && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_4_0
- BOOL shouldContinueWhenAppEntersBackground;
- UIBackgroundTaskIdentifier backgroundTask;
- #endif
-
-
- ASIDataDecompressor *dataDecompressor;
-
-
-
-
-
-
-
-
-
-
-
-
-
- BOOL shouldWaitToInflateCompressedResponses;
-
- BOOL isPACFileRequest;
-
- ASIHTTPRequest *PACFileRequest;
-
- NSInputStream *PACFileReadStream;
-
- NSMutableData *PACFileData;
-
- BOOL isSynchronous;
- #if NS_BLOCKS_AVAILABLE
-
- ASIBasicBlock startedBlock;
-
- ASIHeadersBlock headersReceivedBlock;
-
- ASIBasicBlock completionBlock;
-
- ASIBasicBlock failureBlock;
-
- ASIProgressBlock bytesReceivedBlock;
-
- ASIProgressBlock bytesSentBlock;
-
- ASISizeBlock downloadSizeIncrementedBlock;
-
- ASISizeBlock uploadSizeIncrementedBlock;
-
- ASIDataBlock dataReceivedBlock;
-
- ASIBasicBlock authenticationNeededBlock;
-
- ASIBasicBlock proxyAuthenticationNeededBlock;
-
-
- ASIBasicBlock requestRedirectedBlock;
- #endif
- }
- #pragma mark init / dealloc
- - (id)initWithURL:(NSURL *)newURL;
- + (id)requestWithURL:(NSURL *)newURL;
- + (id)requestWithURL:(NSURL *)newURL usingCache:(id <ASICacheDelegate>)cache;
- + (id)requestWithURL:(NSURL *)newURL usingCache:(id <ASICacheDelegate>)cache andCachePolicy:(ASICachePolicy)policy;
- #if NS_BLOCKS_AVAILABLE
- - (void)setStartedBlock:(ASIBasicBlock)aStartedBlock;
- - (void)setHeadersReceivedBlock:(ASIHeadersBlock)aReceivedBlock;
- - (void)setCompletionBlock:(ASIBasicBlock)aCompletionBlock;
- - (void)setFailedBlock:(ASIBasicBlock)aFailedBlock;
- - (void)setBytesReceivedBlock:(ASIProgressBlock)aBytesReceivedBlock;
- - (void)setBytesSentBlock:(ASIProgressBlock)aBytesSentBlock;
- - (void)setDownloadSizeIncrementedBlock:(ASISizeBlock) aDownloadSizeIncrementedBlock;
- - (void)setUploadSizeIncrementedBlock:(ASISizeBlock) anUploadSizeIncrementedBlock;
- - (void)setDataReceivedBlock:(ASIDataBlock)aReceivedBlock;
- - (void)setAuthenticationNeededBlock:(ASIBasicBlock)anAuthenticationBlock;
- - (void)setProxyAuthenticationNeededBlock:(ASIBasicBlock)aProxyAuthenticationBlock;
- - (void)setRequestRedirectedBlock:(ASIBasicBlock)aRedirectBlock;
- #endif
- #pragma mark setup request
- - (void)addRequestHeader:(NSString *)header value:(NSString *)value;
- - (void)applyCookieHeader;
- - (void)buildRequestHeaders;
- - (void)applyAuthorizationHeader;
- - (void)buildPostBody;
- - (void)appendPostData:(NSData *)data;
- - (void)appendPostDataFromFile:(NSString *)file;
- #pragma mark get information about this request
- - (NSString *)responseString;
- - (NSData *)responseData;
- - (BOOL)isResponseCompressed;
- #pragma mark running a request
- - (void)startSynchronous;
- - (void)startAsynchronous;
- - (void)clearDelegatesAndCancel;
- #pragma mark HEAD request
- - (ASIHTTPRequest *)HEADRequest;
- #pragma mark upload/download progress
- - (void)updateProgressIndicators;
- - (void)updateUploadProgress;
- - (void)updateDownloadProgress;
- - (void)removeUploadProgressSoFar;
- - (void)incrementDownloadSizeBy:(long long)length;
- - (void)incrementUploadSizeBy:(long long)length;
- + (void)updateProgressIndicator:(id *)indicator withProgress:(unsigned long long)progress ofTotal:(unsigned long long)total;
- + (void)performSelector:(SEL)selector onTarget:(id *)target withObject:(id)object amount:(void *)amount callerToRetain:(id)caller;
- #pragma mark talking to delegates
- - (void)requestStarted;
- - (void)requestReceivedResponseHeaders:(NSDictionary *)newHeaders;
- - (void)requestFinished;
- - (void)failWithError:(NSError *)theError;
- - (BOOL)retryUsingNewConnection;
- - (void)redirectToURL:(NSURL *)newURL;
- #pragma mark parsing HTTP response headers
- - (void)readResponseHeaders;
- - (void)parseStringEncodingFromHeaders;
- + (void)parseMimeType:(NSString **)mimeType andResponseEncoding:(NSStringEncoding *)stringEncoding fromContentType:(NSString *)contentType;
- #pragma mark http authentication stuff
- - (BOOL)applyCredentials:(NSDictionary *)newCredentials;
- - (BOOL)applyProxyCredentials:(NSDictionary *)newCredentials;
- - (NSMutableDictionary *)findCredentials;
- - (NSMutableDictionary *)findProxyCredentials;
- - (void)retryUsingSuppliedCredentials;
- - (void)cancelAuthentication;
- - (void)attemptToApplyCredentialsAndResume;
- - (void)attemptToApplyProxyCredentialsAndResume;
- - (BOOL)showProxyAuthenticationDialog;
- - (BOOL)showAuthenticationDialog;
- - (void)addBasicAuthenticationHeaderWithUsername:(NSString *)theUsername andPassword:(NSString *)thePassword;
- #pragma mark stream status handlers
- - (void)handleNetworkEvent:(CFStreamEventType)type;
- - (void)handleBytesAvailable;
- - (void)handleStreamComplete;
- - (void)handleStreamError;
- #pragma mark cleanup
- - (void)markAsFinished;
- - (BOOL)removeTemporaryDownloadFile;
- - (BOOL)removeTemporaryUncompressedDownloadFile;
- - (BOOL)removeTemporaryUploadFile;
- - (BOOL)removeTemporaryCompressedUploadFile;
- + (BOOL)removeFileAtPath:(NSString *)path error:(NSError **)err;
- #pragma mark persistent connections
- - (NSNumber *)connectionID;
- + (void)expirePersistentConnections;
- #pragma mark default time out
- + (NSTimeInterval)defaultTimeOutSeconds;
- + (void)setDefaultTimeOutSeconds:(NSTimeInterval)newTimeOutSeconds;
- #pragma mark client certificate
- - (void)setClientCertificateIdentity:(SecIdentityRef)anIdentity;
- #pragma mark session credentials
- + (NSMutableArray *)sessionProxyCredentialsStore;
- + (NSMutableArray *)sessionCredentialsStore;
- + (void)storeProxyAuthenticationCredentialsInSessionStore:(NSDictionary *)credentials;
- + (void)storeAuthenticationCredentialsInSessionStore:(NSDictionary *)credentials;
- + (void)removeProxyAuthenticationCredentialsFromSessionStore:(NSDictionary *)credentials;
- + (void)removeAuthenticationCredentialsFromSessionStore:(NSDictionary *)credentials;
- - (NSDictionary *)findSessionProxyAuthenticationCredentials;
- - (NSDictionary *)findSessionAuthenticationCredentials;
- #pragma mark keychain storage
- - (void)saveCredentialsToKeychain:(NSDictionary *)newCredentials;
- + (void)saveCredentials:(NSURLCredential *)credentials forHost:(NSString *)host port:(int)port protocol:(NSString *)protocol realm:(NSString *)realm;
- + (void)saveCredentials:(NSURLCredential *)credentials forProxy:(NSString *)host port:(int)port realm:(NSString *)realm;
- + (NSURLCredential *)savedCredentialsForHost:(NSString *)host port:(int)port protocol:(NSString *)protocol realm:(NSString *)realm;
- + (NSURLCredential *)savedCredentialsForProxy:(NSString *)host port:(int)port protocol:(NSString *)protocol realm:(NSString *)realm;
- + (void)removeCredentialsForHost:(NSString *)host port:(int)port protocol:(NSString *)protocol realm:(NSString *)realm;
- + (void)removeCredentialsForProxy:(NSString *)host port:(int)port realm:(NSString *)realm;
- + (void)setSessionCookies:(NSMutableArray *)newSessionCookies;
- + (NSMutableArray *)sessionCookies;
- + (void)addSessionCookie:(NSHTTPCookie *)newCookie;
- + (void)clearSession;
- #pragma mark get user agent
- + (NSString *)defaultUserAgentString;
- + (void)setDefaultUserAgentString:(NSString *)agent;
- #pragma mark mime-type detection
- + (NSString *)mimeTypeForFileAtPath:(NSString *)path;
- #pragma mark bandwidth measurement / throttling
- + (unsigned long)maxBandwidthPerSecond;
- + (void)setMaxBandwidthPerSecond:(unsigned long)bytes;
- + (unsigned long)averageBandwidthUsedPerSecond;
- - (void)performThrottling;
- + (BOOL)isBandwidthThrottled;
- + (void)incrementBandwidthUsedInLastSecond:(unsigned long)bytes;
- #if TARGET_OS_IPHONE
- + (void)setShouldThrottleBandwidthForWWAN:(BOOL)throttle;
- + (void)throttleBandwidthForWWANUsingLimit:(unsigned long)limit;
- #pragma mark reachability
- + (BOOL)isNetworkReachableViaWWAN;
- #endif
- #pragma mark queue
- + (NSOperationQueue *)sharedQueue;
- #pragma mark cache
- + (void)setDefaultCache:(id <ASICacheDelegate>)cache;
- + (id <ASICacheDelegate>)defaultCache;
- + (unsigned long)maxUploadReadLength;
- #pragma mark network activity
- + (BOOL)isNetworkInUse;
- + (void)setShouldUpdateNetworkActivityIndicator:(BOOL)shouldUpdate;
- + (void)showNetworkActivityIndicator;
- + (void)hideNetworkActivityIndicator;
- #pragma mark miscellany
- + (NSString *)base64forData:(NSData *)theData;
- + (NSDate *)expiryDateForRequest:(ASIHTTPRequest *)request maxAge:(NSTimeInterval)maxAge;
- + (NSDate *)dateFromRFC1123String:(NSString *)string;
- #if TARGET_OS_IPHONE
- + (BOOL)isMultitaskingSupported;
- #endif
- #pragma mark threading behaviour
- + (NSThread *)threadForRequest:(ASIHTTPRequest *)request;
- #pragma mark ===
- @property (atomic, retain) NSString *username;
- @property (atomic, retain) NSString *password;
- @property (atomic, retain) NSString *userAgentString;
- @property (atomic, retain) NSString *domain;
- @property (atomic, retain) NSString *proxyUsername;
- @property (atomic, retain) NSString *proxyPassword;
- @property (atomic, retain) NSString *proxyDomain;
- @property (atomic, retain) NSString *proxyHost;
- @property (atomic, assign) int proxyPort;
- @property (atomic, retain) NSString *proxyType;
- @property (retain,setter=setURL:, nonatomic) NSURL *url;
- @property (atomic, retain) NSURL *originalURL;
- @property (assign, nonatomic) id delegate;
- @property (retain, nonatomic) id queue;
- @property (assign, nonatomic) id uploadProgressDelegate;
- @property (assign, nonatomic) id downloadProgressDelegate;
- @property (atomic, assign) BOOL useKeychainPersistence;
- @property (atomic, assign) BOOL useSessionPersistence;
- @property (atomic, retain) NSString *downloadDestinationPath;
- @property (atomic, retain) NSString *temporaryFileDownloadPath;
- @property (atomic, retain) NSString *temporaryUncompressedDataDownloadPath;
- @property (atomic, assign) SEL didStartSelector;
- @property (atomic, assign) SEL didReceiveResponseHeadersSelector;
- @property (atomic, assign) SEL willRedirectSelector;
- @property (atomic, assign) SEL didFinishSelector;
- @property (atomic, assign) SEL didFailSelector;
- @property (atomic, assign) SEL didReceiveDataSelector;
- @property (atomic, retain,readonly) NSString *authenticationRealm;
- @property (atomic, retain,readonly) NSString *proxyAuthenticationRealm;
- @property (atomic, retain) NSError *error;
- @property (atomic, assign,readonly) BOOL complete;
- @property (atomic, retain) NSDictionary *responseHeaders;
- @property (atomic, retain) NSMutableDictionary *requestHeaders;
- @property (atomic, retain) NSMutableArray *requestCookies;
- @property (atomic, retain,readonly) NSArray *responseCookies;
- @property (atomic, assign) BOOL useCookiePersistence;
- @property (atomic, retain) NSDictionary *requestCredentials;
- @property (atomic, retain) NSDictionary *proxyCredentials;
- @property (atomic, assign,readonly) int responseStatusCode;
- @property (atomic, retain,readonly) NSString *responseStatusMessage;
- @property (atomic, retain) NSMutableData *rawResponseData;
- @property (atomic, assign) NSTimeInterval timeOutSeconds;
- @property (retain, nonatomic) NSString *requestMethod;
- @property (atomic, retain) NSMutableData *postBody;
- @property (atomic, assign) unsigned long long contentLength;
- @property (atomic, assign) unsigned long long postLength;
- @property (atomic, assign) BOOL shouldResetDownloadProgress;
- @property (atomic, assign) BOOL shouldResetUploadProgress;
- @property (atomic, assign) ASIHTTPRequest *mainRequest;
- @property (atomic, assign) BOOL showAccurateProgress;
- @property (atomic, assign) unsigned long long totalBytesRead;
- @property (atomic, assign) unsigned long long totalBytesSent;
- @property (atomic, assign) NSStringEncoding defaultResponseEncoding;
- @property (atomic, assign) NSStringEncoding responseEncoding;
- @property (atomic, assign) BOOL allowCompressedResponse;
- @property (atomic, assign) BOOL allowResumeForFileDownloads;
- @property (atomic, retain) NSDictionary *userInfo;
- @property (atomic, assign) NSInteger tag;
- @property (atomic, retain) NSString *postBodyFilePath;
- @property (atomic, assign) BOOL shouldStreamPostDataFromDisk;
- @property (atomic, assign) BOOL didCreateTemporaryPostDataFile;
- @property (atomic, assign) BOOL useHTTPVersionOne;
- @property (atomic, assign, readonly) unsigned long long partialDownloadSize;
- @property (atomic, assign) BOOL shouldRedirect;
- @property (atomic, assign) BOOL validatesSecureCertificate;
- @property (atomic, assign) BOOL shouldCompressRequestBody;
- @property (atomic, retain) NSURL *PACurl;
- @property (atomic, retain) NSString *authenticationScheme;
- @property (atomic, retain) NSString *proxyAuthenticationScheme;
- @property (atomic, assign) BOOL shouldPresentAuthenticationDialog;
- @property (atomic, assign) BOOL shouldPresentProxyAuthenticationDialog;
- @property (atomic, assign, readonly) ASIAuthenticationState authenticationNeeded;
- @property (atomic, assign) BOOL shouldPresentCredentialsBeforeChallenge;
- @property (atomic, assign, readonly) int authenticationRetryCount;
- @property (atomic, assign, readonly) int proxyAuthenticationRetryCount;
- @property (atomic, assign) BOOL haveBuiltRequestHeaders;
- @property (assign, nonatomic) BOOL haveBuiltPostBody;
- @property (atomic, assign, readonly) BOOL inProgress;
- @property (atomic, assign) int numberOfTimesToRetryOnTimeout;
- @property (atomic, assign, readonly) int retryCount;
- @property (atomic, assign) BOOL shouldAttemptPersistentConnection;
- @property (atomic, atomic, assign) NSTimeInterval persistentConnectionTimeoutSeconds;
- @property (atomic, assign) BOOL shouldUseRFC2616RedirectBehaviour;
- @property (atomic, assign, readonly) BOOL connectionCanBeReused;
- @property (atomic, retain, readonly) NSNumber *requestID;
- @property (atomic, assign) id <ASICacheDelegate> downloadCache;
- @property (atomic, assign) ASICachePolicy cachePolicy;
- @property (atomic, assign) ASICacheStoragePolicy cacheStoragePolicy;
- @property (atomic, assign, readonly) BOOL didUseCachedResponse;
- @property (atomic, assign) NSTimeInterval secondsToCache;
- @property (atomic, retain) NSArray *clientCertificates;
- #if TARGET_OS_IPHONE && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_4_0
- @property (atomic, assign) BOOL shouldContinueWhenAppEntersBackground;
- #endif
- @property (atomic, retain) ASIDataDecompressor *dataDecompressor;
- @property (atomic, assign) BOOL shouldWaitToInflateCompressedResponses;
- @end
|