Class NSMutableURLRequest
- java.lang.Object
-
- org.moe.natj.general.NativeObject
-
- org.moe.natj.objc.ObjCObject
-
- apple.NSObject
-
- apple.foundation.NSURLRequest
-
- apple.foundation.NSMutableURLRequest
-
- All Implemented Interfaces:
NSCoding,NSCopying,NSMutableCopying,NSSecureCoding,NSObject
public class NSMutableURLRequest extends NSURLRequest
NSMutableURLRequest An NSMutableURLRequest object represents a mutable URL load request in a manner independent of protocol and URL scheme. This specialization of NSURLRequest is provided to aid developers who may find it more convenient to mutate a single request object for a series of URL loads instead of creating an immutable NSURLRequest for each load. This programming model is supported by the following contract stipulation between NSMutableURLRequest and NSURLConnection: NSURLConnection makes a deep copy of each NSMutableURLRequest object passed to one of its initializers.NSMutableURLRequest is designed to be extended to support protocol-specific data by adding categories to access a property object provided in an interface targeted at protocol implementors.
- Protocol implementors should direct their attention to the NSMutableURLRequestExtensibility category on NSMutableURLRequest for more information on how to provide extensions on NSMutableURLRequest to support protocol-specific request information.
- Clients of this API who wish to create NSMutableURLRequest objects to load URL content should consult the protocol-specific NSMutableURLRequest categories that are available. The NSMutableHTTPURLRequest category on NSMutableURLRequest is an example.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class apple.NSObject
NSObject.Function_instanceMethodForSelector_ret, NSObject.Function_methodForSelector_ret
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedNSMutableURLRequest(org.moe.natj.general.Pointer peer)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean_supportsSecureCoding()This property must return YES on all classes that allow secure coding.static booleanaccessInstanceVariablesDirectly()voidaddValueForHTTPHeaderField(java.lang.String value, java.lang.String field)addValue:forHTTPHeaderField: Adds an HTTP header field in the current header dictionary.NSDictionary<java.lang.String,java.lang.String>allHTTPHeaderFields()Sets the HTTP header fields of the receiver to the given dictionary.static NSMutableURLRequestalloc()static java.lang.ObjectallocWithZone(org.moe.natj.general.ptr.VoidPtr zone)booleanallowsCellularAccess()sets whether a connection created with this request is allowed to use the built in cellular radios (if present).booleanallowsConstrainedNetworkAccess()sets whether a connection created with this request is allowed to use network interfaces which have been marked as constrained.booleanallowsExpensiveNetworkAccess()sets whether a connection created with this request is allowed to use network interfaces which have been marked as expensive.static booleanautomaticallyNotifiesObserversForKey(java.lang.String key)voidbindToHotspotHelperCommand(NEHotspotHelperCommand command)bindToHotspotHelperCommand: Binds the NSMutableURLRequest to the network interface associated with the NEHotspotHelperCommand object.longcachePolicy()The cache policy of the receiver.static voidcancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget)static voidcancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget, org.moe.natj.objc.SEL aSelector, java.lang.Object anArgument)static NSArray<java.lang.String>classFallbacksForKeyedArchiver()static org.moe.natj.objc.ClassclassForKeyedUnarchiver()static java.lang.StringdebugDescription_static()static java.lang.Stringdescription_static()static longhash_static()NSDataHTTPBody()Sets the request body data of the receiver.NSInputStreamHTTPBodyStream()Sets the request body to be the contents of the given stream.java.lang.StringHTTPMethod()Sets the HTTP request method of the receiver.booleanHTTPShouldHandleCookies()Decide whether default cookie handling will happen for this request (YES if cookies should be sent with and set for this request; otherwise NO).booleanHTTPShouldUsePipelining()Sets whether the request should not wait for the previous response before transmitting (YES if the receiver should transmit before the previous response is received.NSMutableURLRequestinit()NSMutableURLRequestinitWithCoder(NSCoder coder)NS_DESIGNATED_INITIALIZERNSMutableURLRequestinitWithURL(NSURL URL)initWithURL: Initializes an NSURLRequest with the given URL.NSMutableURLRequestinitWithURLCachePolicyTimeoutInterval(NSURL URL, long cachePolicy, double timeoutInterval)initWithURL: Initializes an NSURLRequest with the given URL and cache policy.static NSObject.Function_instanceMethodForSelector_retinstanceMethodForSelector(org.moe.natj.objc.SEL aSelector)static NSMethodSignatureinstanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)static booleaninstancesRespondToSelector(org.moe.natj.objc.SEL aSelector)static booleanisSubclassOfClass(org.moe.natj.objc.Class aClass)static NSSet<java.lang.String>keyPathsForValuesAffectingValueForKey(java.lang.String key)NSURLmainDocumentURL()Sets the main document URL The caller should pass the URL for an appropriate main document, if known.longnetworkServiceType()Sets the NSURLRequestNetworkServiceType to associate with this request This method is used to provide the network layers with a hint as to the purpose of the request.static java.lang.Objectnew_objc()static NSMutableURLRequestrequestWithURL(NSURL URL)static NSMutableURLRequestrequestWithURLCachePolicyTimeoutInterval(NSURL URL, long cachePolicy, double timeoutInterval)static booleanresolveClassMethod(org.moe.natj.objc.SEL sel)static booleanresolveInstanceMethod(org.moe.natj.objc.SEL sel)voidsetAllHTTPHeaderFields(NSDictionary<java.lang.String,java.lang.String> value)Sets the HTTP header fields of the receiver to the given dictionary.voidsetAllowsCellularAccess(boolean value)sets whether a connection created with this request is allowed to use the built in cellular radios (if present).voidsetAllowsConstrainedNetworkAccess(boolean value)sets whether a connection created with this request is allowed to use network interfaces which have been marked as constrained.voidsetAllowsExpensiveNetworkAccess(boolean value)sets whether a connection created with this request is allowed to use network interfaces which have been marked as expensive.voidsetCachePolicy(long value)The cache policy of the receiver.voidsetHTTPBody(NSData value)Sets the request body data of the receiver.voidsetHTTPBodyStream(NSInputStream value)Sets the request body to be the contents of the given stream.voidsetHTTPMethod(java.lang.String value)Sets the HTTP request method of the receiver.voidsetHTTPShouldHandleCookies(boolean value)Decide whether default cookie handling will happen for this request (YES if cookies should be sent with and set for this request; otherwise NO).voidsetHTTPShouldUsePipelining(boolean value)Sets whether the request should not wait for the previous response before transmitting (YES if the receiver should transmit before the previous response is received.voidsetMainDocumentURL(NSURL value)Sets the main document URL The caller should pass the URL for an appropriate main document, if known.voidsetNetworkServiceType(long value)Sets the NSURLRequestNetworkServiceType to associate with this request This method is used to provide the network layers with a hint as to the purpose of the request.voidsetTimeoutInterval(double value)Sets the timeout interval of the receiver.voidsetURL(NSURL value)The URL of the receiver.voidsetValueForHTTPHeaderField(java.lang.String value, java.lang.String field)setValue:forHTTPHeaderField: Sets the value of the given HTTP header field.static voidsetVersion_static(long aVersion)static org.moe.natj.objc.Classsuperclass_static()static booleansupportsSecureCoding()doubletimeoutInterval()Sets the timeout interval of the receiver.NSURLURL()The URL of the receiver.static longversion_static()-
Methods inherited from class apple.foundation.NSURLRequest
copyWithZone, encodeWithCoder, mutableCopyWithZone, valueForHTTPHeaderField
-
Methods inherited from class apple.NSObject
accessibilityActivate, accessibilityActivationPoint, accessibilityAssistiveTechnologyFocusedIdentifiers, accessibilityAttributedHint, accessibilityAttributedLabel, accessibilityAttributedUserInputLabels, accessibilityAttributedValue, accessibilityContainerType, accessibilityCustomActions, accessibilityCustomRotors, accessibilityDecrement, accessibilityDragSourceDescriptors, accessibilityDropPointDescriptors, accessibilityElementAtIndex, accessibilityElementCount, accessibilityElementDidBecomeFocused, accessibilityElementDidLoseFocus, accessibilityElementIsFocused, accessibilityElements, accessibilityElementsHidden, accessibilityFrame, accessibilityHint, accessibilityIncrement, accessibilityLabel, accessibilityLanguage, accessibilityNavigationStyle, accessibilityPath, accessibilityPerformEscape, accessibilityPerformMagicTap, accessibilityRespondsToUserInteraction, accessibilityScroll, accessibilityTextualContext, accessibilityTraits, accessibilityUserInputLabels, accessibilityValue, accessibilityViewIsModal, addObserverForKeyPathOptionsContext, attemptRecoveryFromErrorOptionIndex, attemptRecoveryFromErrorOptionIndexDelegateDidRecoverSelectorContextInfo, autoContentAccessingProxy, awakeAfterUsingCoder, awakeFromNib, class_objc, classForCoder, classForKeyedArchiver, copy, dealloc, debugDescription, description, dictionaryWithValuesForKeys, didChangeValueForKey, didChangeValueForKeyWithSetMutationUsingObjects, didChangeValuesAtIndexesForKey, doesNotRecognizeSelector, fileManagerShouldProceedAfterError, fileManagerWillProcessPath, finalize_objc, forwardingTargetForSelector, forwardInvocation, hash, indexOfAccessibilityElement, isAccessibilityElement, isEqual, isKindOfClass, isMemberOfClass, isProxy, methodForSelector, methodSignatureForSelector, mutableArrayValueForKey, mutableArrayValueForKeyPath, mutableCopy, mutableOrderedSetValueForKey, mutableOrderedSetValueForKeyPath, mutableSetValueForKey, mutableSetValueForKeyPath, observationInfo, observeValueForKeyPathOfObjectChangeContext, performSelector, performSelectorInBackgroundWithObject, performSelectorOnMainThreadWithObjectWaitUntilDone, performSelectorOnMainThreadWithObjectWaitUntilDoneModes, performSelectorOnThreadWithObjectWaitUntilDone, performSelectorOnThreadWithObjectWaitUntilDoneModes, performSelectorWithObject, performSelectorWithObjectAfterDelay, performSelectorWithObjectAfterDelayInModes, performSelectorWithObjectWithObject, prepareForInterfaceBuilder, provideImageDataBytesPerRowOrigin_Size_UserInfo, removeObserverForKeyPath, removeObserverForKeyPathContext, replacementObjectForCoder, replacementObjectForKeyedArchiver, respondsToSelector, self, setAccessibilityActivationPoint, setAccessibilityAttributedHint, setAccessibilityAttributedLabel, setAccessibilityAttributedUserInputLabels, setAccessibilityAttributedValue, setAccessibilityContainerType, setAccessibilityCustomActions, setAccessibilityCustomRotors, setAccessibilityDragSourceDescriptors, setAccessibilityDropPointDescriptors, setAccessibilityElements, setAccessibilityElementsHidden, setAccessibilityFrame, setAccessibilityHint, setAccessibilityLabel, setAccessibilityLanguage, setAccessibilityNavigationStyle, setAccessibilityPath, setAccessibilityRespondsToUserInteraction, setAccessibilityTextualContext, setAccessibilityTraits, setAccessibilityUserInputLabels, setAccessibilityValue, setAccessibilityViewIsModal, setIsAccessibilityElement, setNilValueForKey, setObservationInfo, setShouldGroupAccessibilityChildren, setValueForKey, setValueForKeyPath, setValueForUndefinedKey, setValuesForKeysWithDictionary, shouldGroupAccessibilityChildren, superclass, validateValueForKeyError, validateValueForKeyPathError, valueForKey, valueForKeyPath, valueForUndefinedKey, willChangeValueForKey, willChangeValueForKeyWithSetMutationUsingObjects, willChangeValuesAtIndexesForKey
-
-
-
-
Method Detail
-
accessInstanceVariablesDirectly
public static boolean accessInstanceVariablesDirectly()
-
alloc
public static NSMutableURLRequest alloc()
-
allocWithZone
public static java.lang.Object allocWithZone(org.moe.natj.general.ptr.VoidPtr zone)
-
automaticallyNotifiesObserversForKey
public static boolean automaticallyNotifiesObserversForKey(java.lang.String key)
-
cancelPreviousPerformRequestsWithTarget
public static void cancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget)
-
cancelPreviousPerformRequestsWithTargetSelectorObject
public static void cancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget, org.moe.natj.objc.SEL aSelector, java.lang.Object anArgument)
-
classFallbacksForKeyedArchiver
public static NSArray<java.lang.String> classFallbacksForKeyedArchiver()
-
classForKeyedUnarchiver
public static org.moe.natj.objc.Class classForKeyedUnarchiver()
-
debugDescription_static
public static java.lang.String debugDescription_static()
-
description_static
public static java.lang.String description_static()
-
hash_static
public static long hash_static()
-
instanceMethodForSelector
public static NSObject.Function_instanceMethodForSelector_ret instanceMethodForSelector(org.moe.natj.objc.SEL aSelector)
-
instanceMethodSignatureForSelector
public static NSMethodSignature instanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)
-
instancesRespondToSelector
public static boolean instancesRespondToSelector(org.moe.natj.objc.SEL aSelector)
-
isSubclassOfClass
public static boolean isSubclassOfClass(org.moe.natj.objc.Class aClass)
-
keyPathsForValuesAffectingValueForKey
public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey(java.lang.String key)
-
new_objc
public static java.lang.Object new_objc()
-
requestWithURL
public static NSMutableURLRequest requestWithURL(NSURL URL)
-
requestWithURLCachePolicyTimeoutInterval
public static NSMutableURLRequest requestWithURLCachePolicyTimeoutInterval(NSURL URL, long cachePolicy, double timeoutInterval)
-
resolveClassMethod
public static boolean resolveClassMethod(org.moe.natj.objc.SEL sel)
-
resolveInstanceMethod
public static boolean resolveInstanceMethod(org.moe.natj.objc.SEL sel)
-
setVersion_static
public static void setVersion_static(long aVersion)
-
superclass_static
public static org.moe.natj.objc.Class superclass_static()
-
supportsSecureCoding
public static boolean supportsSecureCoding()
-
version_static
public static long version_static()
-
HTTPBody
public NSData HTTPBody()
Sets the request body data of the receiver. This data is sent as the message body of the request, as in done in an HTTP POST request.- Overrides:
HTTPBodyin classNSURLRequest- Returns:
- The request body data of the receiver.
-
HTTPBodyStream
public NSInputStream HTTPBodyStream()
Sets the request body to be the contents of the given stream. The provided stream should be unopened; the request will take over the stream's delegate. The entire stream's contents will be transmitted as the HTTP body of the request. Note that the body stream and the body data (set by setHTTPBody:, above) are mutually exclusive - setting one will clear the other.- Overrides:
HTTPBodyStreamin classNSURLRequest- Returns:
- The request body stream of the receiver.
-
HTTPMethod
public java.lang.String HTTPMethod()
Sets the HTTP request method of the receiver.- Overrides:
HTTPMethodin classNSURLRequest- Returns:
- the HTTP request method of the receiver.
-
HTTPShouldHandleCookies
public boolean HTTPShouldHandleCookies()
Decide whether default cookie handling will happen for this request (YES if cookies should be sent with and set for this request; otherwise NO). The default is YES - in other words, cookies are sent from and stored to the cookie manager by default. NOTE: In releases prior to 10.3, this value is ignored- Overrides:
HTTPShouldHandleCookiesin classNSURLRequest- Returns:
- YES if cookies will be sent with and set for this request; otherwise NO.
-
HTTPShouldUsePipelining
public boolean HTTPShouldUsePipelining()
Sets whether the request should not wait for the previous response before transmitting (YES if the receiver should transmit before the previous response is received. NO to wait for the previous response before transmitting) Calling this method with a YES value does not guarantee HTTP pipelining behavior. This method may have no effect if an HTTP proxy is configured, or if the HTTP request uses an unsafe request method (e.g., POST requests will not pipeline). Pipelining behavior also may not begin until the second request on a given TCP connection. There may be other situations where pipelining does not occur even though YES was set. HTTP 1.1 allows the client to send multiple requests to the server without waiting for a response. Though HTTP 1.1 requires support for pipelining, some servers report themselves as being HTTP 1.1 but do not support pipelining (disconnecting, sending resources misordered, omitting part of a resource, etc.).- Overrides:
HTTPShouldUsePipeliningin classNSURLRequest- Returns:
- YES if the receiver should transmit before the previous response is received. NO if the receiver should wait for the previous response before transmitting.
-
URL
public NSURL URL()
The URL of the receiver.- Overrides:
URLin classNSURLRequest- Returns:
- The URL of the receiver.
-
addValueForHTTPHeaderField
public void addValueForHTTPHeaderField(java.lang.String value, java.lang.String field)addValue:forHTTPHeaderField: Adds an HTTP header field in the current header dictionary. This method provides a way to add values to header fields incrementally. If a value was previously set for the given header field, the given value is appended to the previously-existing value. The appropriate field delimiter, a comma in the case of HTTP, is added by the implementation, and should not be added to the given value by the caller. Note that, in keeping with the HTTP RFC, HTTP header field names are case-insensitive.- Parameters:
value- the header field value.field- the header field name (case-insensitive).
-
allHTTPHeaderFields
public NSDictionary<java.lang.String,java.lang.String> allHTTPHeaderFields()
Sets the HTTP header fields of the receiver to the given dictionary. This method replaces all header fields that may have existed before this method call.Since HTTP header fields must be string values, each object and key in the dictionary passed to this method must answer YES when sent an -isKindOfClass:[NSString class] message. If either the key or value for a key-value pair answers NO when sent this message, the key-value pair is skipped.
- Overrides:
allHTTPHeaderFieldsin classNSURLRequest- Returns:
- a dictionary containing all the HTTP header fields of the receiver.
-
allowsCellularAccess
public boolean allowsCellularAccess()
sets whether a connection created with this request is allowed to use the built in cellular radios (if present). NO if the receiver should not be allowed to use the built in cellular radios to satisfy the request, YES otherwise. The default is YES.- Overrides:
allowsCellularAccessin classNSURLRequest- Returns:
- YES if the receiver is allowed to use the built in cellular radios to satify the request, NO otherwise.
-
bindToHotspotHelperCommand
public void bindToHotspotHelperCommand(NEHotspotHelperCommand command)
bindToHotspotHelperCommand: Binds the NSMutableURLRequest to the network interface associated with the NEHotspotHelperCommand object.
-
cachePolicy
public long cachePolicy()
The cache policy of the receiver.- Overrides:
cachePolicyin classNSURLRequest- Returns:
- The cache policy of the receiver.
-
init
public NSMutableURLRequest init()
- Overrides:
initin classNSURLRequest
-
initWithCoder
public NSMutableURLRequest initWithCoder(NSCoder coder)
Description copied from interface:NSCodingNS_DESIGNATED_INITIALIZER- Specified by:
initWithCoderin interfaceNSCoding- Overrides:
initWithCoderin classNSURLRequest
-
initWithURL
public NSMutableURLRequest initWithURL(NSURL URL)
Description copied from class:NSURLRequestinitWithURL: Initializes an NSURLRequest with the given URL. Default values are used for cache policy (NSURLRequestUseProtocolCachePolicy) and timeout interval (60 seconds).- Overrides:
initWithURLin classNSURLRequest- Parameters:
URL- The URL for the request.- Returns:
- An initialized NSURLRequest.
-
initWithURLCachePolicyTimeoutInterval
public NSMutableURLRequest initWithURLCachePolicyTimeoutInterval(NSURL URL, long cachePolicy, double timeoutInterval)
Description copied from class:NSURLRequestinitWithURL: Initializes an NSURLRequest with the given URL and cache policy. This is the designated initializer for the NSURLRequest class.- Overrides:
initWithURLCachePolicyTimeoutIntervalin classNSURLRequest- Parameters:
URL- The URL for the request.cachePolicy- The cache policy for the request.timeoutInterval- The timeout interval for the request. See the commentary for the timeoutInterval for more information on timeout intervals.- Returns:
- An initialized NSURLRequest.
-
mainDocumentURL
public NSURL mainDocumentURL()
Sets the main document URL The caller should pass the URL for an appropriate main document, if known. For example, when loading a web page, the URL of the main html document for the top-level frame should be passed. This main document will be used to implement the cookie "only from same domain as main document" policy, and possibly other things in the future. NOTE: In the current implementation, the passed-in value is unused by the framework. A fully functional version of this method will be available in the future.- Overrides:
mainDocumentURLin classNSURLRequest- Returns:
- The main document URL.
-
networkServiceType
public long networkServiceType()
Sets the NSURLRequestNetworkServiceType to associate with this request This method is used to provide the network layers with a hint as to the purpose of the request. Most clients should not need to use this method.- Overrides:
networkServiceTypein classNSURLRequest- Returns:
- The NSURLRequestNetworkServiceType associated with this request.
-
setAllHTTPHeaderFields
public void setAllHTTPHeaderFields(NSDictionary<java.lang.String,java.lang.String> value)
Sets the HTTP header fields of the receiver to the given dictionary. This method replaces all header fields that may have existed before this method call.Since HTTP header fields must be string values, each object and key in the dictionary passed to this method must answer YES when sent an -isKindOfClass:[NSString class] message. If either the key or value for a key-value pair answers NO when sent this message, the key-value pair is skipped.
-
setAllowsCellularAccess
public void setAllowsCellularAccess(boolean value)
sets whether a connection created with this request is allowed to use the built in cellular radios (if present). NO if the receiver should not be allowed to use the built in cellular radios to satisfy the request, YES otherwise. The default is YES.
-
setCachePolicy
public void setCachePolicy(long value)
The cache policy of the receiver.
-
setHTTPBody
public void setHTTPBody(NSData value)
Sets the request body data of the receiver. This data is sent as the message body of the request, as in done in an HTTP POST request.
-
setHTTPBodyStream
public void setHTTPBodyStream(NSInputStream value)
Sets the request body to be the contents of the given stream. The provided stream should be unopened; the request will take over the stream's delegate. The entire stream's contents will be transmitted as the HTTP body of the request. Note that the body stream and the body data (set by setHTTPBody:, above) are mutually exclusive - setting one will clear the other.
-
setHTTPMethod
public void setHTTPMethod(java.lang.String value)
Sets the HTTP request method of the receiver.
-
setHTTPShouldHandleCookies
public void setHTTPShouldHandleCookies(boolean value)
Decide whether default cookie handling will happen for this request (YES if cookies should be sent with and set for this request; otherwise NO). The default is YES - in other words, cookies are sent from and stored to the cookie manager by default. NOTE: In releases prior to 10.3, this value is ignored
-
setHTTPShouldUsePipelining
public void setHTTPShouldUsePipelining(boolean value)
Sets whether the request should not wait for the previous response before transmitting (YES if the receiver should transmit before the previous response is received. NO to wait for the previous response before transmitting) Calling this method with a YES value does not guarantee HTTP pipelining behavior. This method may have no effect if an HTTP proxy is configured, or if the HTTP request uses an unsafe request method (e.g., POST requests will not pipeline). Pipelining behavior also may not begin until the second request on a given TCP connection. There may be other situations where pipelining does not occur even though YES was set. HTTP 1.1 allows the client to send multiple requests to the server without waiting for a response. Though HTTP 1.1 requires support for pipelining, some servers report themselves as being HTTP 1.1 but do not support pipelining (disconnecting, sending resources misordered, omitting part of a resource, etc.).
-
setMainDocumentURL
public void setMainDocumentURL(NSURL value)
Sets the main document URL The caller should pass the URL for an appropriate main document, if known. For example, when loading a web page, the URL of the main html document for the top-level frame should be passed. This main document will be used to implement the cookie "only from same domain as main document" policy, and possibly other things in the future. NOTE: In the current implementation, the passed-in value is unused by the framework. A fully functional version of this method will be available in the future.
-
setNetworkServiceType
public void setNetworkServiceType(long value)
Sets the NSURLRequestNetworkServiceType to associate with this request This method is used to provide the network layers with a hint as to the purpose of the request. Most clients should not need to use this method.
-
setTimeoutInterval
public void setTimeoutInterval(double value)
Sets the timeout interval of the receiver. The timeout interval specifies the limit on the idle interval allotted to a request in the process of loading. The "idle interval" is defined as the period of time that has passed since the last instance of load activity occurred for a request that is in the process of loading. Hence, when an instance of load activity occurs (e.g. bytes are received from the network for a request), the idle interval for a request is reset to 0. If the idle interval ever becomes greater than or equal to the timeout interval, the request is considered to have timed out. This timeout interval is measured in seconds.
-
setURL
public void setURL(NSURL value)
The URL of the receiver.
-
setValueForHTTPHeaderField
public void setValueForHTTPHeaderField(java.lang.String value, java.lang.String field)setValue:forHTTPHeaderField: Sets the value of the given HTTP header field. If a value was previously set for the given header field, that value is replaced with the given value. Note that, in keeping with the HTTP RFC, HTTP header field names are case-insensitive.- Parameters:
value- the header field value.field- the header field name (case-insensitive).
-
_supportsSecureCoding
public boolean _supportsSecureCoding()
Description copied from interface:NSSecureCodingThis property must return YES on all classes that allow secure coding. Subclasses of classes that adopt NSSecureCoding and override initWithCoder: must also override this method and return YES. The Secure Coding Guide should be consulted when writing methods that decode data.- Specified by:
_supportsSecureCodingin interfaceNSSecureCoding- Overrides:
_supportsSecureCodingin classNSURLRequest
-
timeoutInterval
public double timeoutInterval()
Sets the timeout interval of the receiver. The timeout interval specifies the limit on the idle interval allotted to a request in the process of loading. The "idle interval" is defined as the period of time that has passed since the last instance of load activity occurred for a request that is in the process of loading. Hence, when an instance of load activity occurs (e.g. bytes are received from the network for a request), the idle interval for a request is reset to 0. If the idle interval ever becomes greater than or equal to the timeout interval, the request is considered to have timed out. This timeout interval is measured in seconds.- Overrides:
timeoutIntervalin classNSURLRequest- Returns:
- The timeout interval of the receiver.
-
allowsConstrainedNetworkAccess
public boolean allowsConstrainedNetworkAccess()
sets whether a connection created with this request is allowed to use network interfaces which have been marked as constrained. NO if the receiver should not be allowed to use an interface marked as constrained to satify the request, YES otherwise.- Overrides:
allowsConstrainedNetworkAccessin classNSURLRequest- Returns:
- YES if the receiver is allowed to use an interface marked as constrained to satify the request, NO otherwise.
-
allowsExpensiveNetworkAccess
public boolean allowsExpensiveNetworkAccess()
sets whether a connection created with this request is allowed to use network interfaces which have been marked as expensive. NO if the receiver should not be allowed to use an interface marked as expensive to satify the request, YES otherwise.- Overrides:
allowsExpensiveNetworkAccessin classNSURLRequest- Returns:
- YES if the receiver is allowed to use an interface marked as expensive to satify the request, NO otherwise.
-
setAllowsConstrainedNetworkAccess
public void setAllowsConstrainedNetworkAccess(boolean value)
sets whether a connection created with this request is allowed to use network interfaces which have been marked as constrained. NO if the receiver should not be allowed to use an interface marked as constrained to satify the request, YES otherwise.
-
setAllowsExpensiveNetworkAccess
public void setAllowsExpensiveNetworkAccess(boolean value)
sets whether a connection created with this request is allowed to use network interfaces which have been marked as expensive. NO if the receiver should not be allowed to use an interface marked as expensive to satify the request, YES otherwise.
-
-