Package apple.foundation
Class NSURLRequest
- java.lang.Object
-
- org.moe.natj.general.NativeObject
-
- org.moe.natj.objc.ObjCObject
-
- apple.NSObject
-
- apple.foundation.NSURLRequest
-
- All Implemented Interfaces:
NSCoding,NSCopying,NSMutableCopying,NSSecureCoding,NSObject
- Direct Known Subclasses:
NSMutableURLRequest
public class NSURLRequest extends NSObject implements NSSecureCoding, NSCopying, NSMutableCopying
NSURLRequest An NSURLRequest object represents a URL load request in a manner independent of protocol and URL scheme. NSURLRequest encapsulates two basic data elements about a URL load request:- The URL to load.
- The policy to use when consulting the URL content cache made available by the implementation.
- Protocol implementors should direct their attention to the NSURLRequestExtensibility category on NSURLRequest for more information on how to provide extensions on NSURLRequest to support protocol-specific request information.
- Clients of this API who wish to create NSURLRequest objects to load URL content should consult the protocol-specific NSURLRequest categories that are available. The NSHTTPURLRequest category on NSURLRequest is an example.
Objects of this class are used to create NSURLConnection instances, which can are used to perform the load of a URL, or as input to the NSURLConnection class method which performs synchronous loads. API-Since: 2.0
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class apple.NSObject
NSObject.Block_accessibilityActivateBlock_ret, NSObject.Block_accessibilityActivationPointBlock_ret, NSObject.Block_accessibilityAttributedHintBlock_ret, NSObject.Block_accessibilityAttributedLabelBlock_ret, NSObject.Block_accessibilityAttributedUserInputLabelsBlock_ret, NSObject.Block_accessibilityAttributedValueBlock_ret, NSObject.Block_accessibilityContainerTypeBlock_ret, NSObject.Block_accessibilityCustomActionsBlock_ret, NSObject.Block_accessibilityCustomRotorsBlock_ret, NSObject.Block_accessibilityDecrementBlock_ret, NSObject.Block_accessibilityElementsBlock_ret, NSObject.Block_accessibilityElementsHiddenBlock_ret, NSObject.Block_accessibilityFrameBlock_ret, NSObject.Block_accessibilityHeaderElementsBlock_ret, NSObject.Block_accessibilityHintBlock_ret, NSObject.Block_accessibilityIdentifierBlock_ret, NSObject.Block_accessibilityIncrementBlock_ret, NSObject.Block_accessibilityLabelBlock_ret, NSObject.Block_accessibilityLanguageBlock_ret, NSObject.Block_accessibilityMagicTapBlock_ret, NSObject.Block_accessibilityNavigationStyleBlock_ret, NSObject.Block_accessibilityPathBlock_ret, NSObject.Block_accessibilityPerformEscapeBlock_ret, NSObject.Block_accessibilityRespondsToUserInteractionBlock_ret, NSObject.Block_accessibilityShouldGroupAccessibilityChildrenBlock_ret, NSObject.Block_accessibilityTextualContextBlock_ret, NSObject.Block_accessibilityTraitsBlock_ret, NSObject.Block_accessibilityUserInputLabelsBlock_ret, NSObject.Block_accessibilityValueBlock_ret, NSObject.Block_accessibilityViewIsModalBlock_ret, NSObject.Block_automationElementsBlock_ret, NSObject.Block_isAccessibilityElementBlock_ret, NSObject.Block_setAccessibilityActivateBlock, NSObject.Block_setAccessibilityActivationPointBlock, NSObject.Block_setAccessibilityAttributedHintBlock, NSObject.Block_setAccessibilityAttributedLabelBlock, NSObject.Block_setAccessibilityAttributedUserInputLabelsBlock, NSObject.Block_setAccessibilityAttributedValueBlock, NSObject.Block_setAccessibilityContainerTypeBlock, NSObject.Block_setAccessibilityCustomActionsBlock, NSObject.Block_setAccessibilityCustomRotorsBlock, NSObject.Block_setAccessibilityDecrementBlock, NSObject.Block_setAccessibilityElementsBlock, NSObject.Block_setAccessibilityElementsHiddenBlock, NSObject.Block_setAccessibilityFrameBlock, NSObject.Block_setAccessibilityHeaderElementsBlock, NSObject.Block_setAccessibilityHintBlock, NSObject.Block_setAccessibilityIdentifierBlock, NSObject.Block_setAccessibilityIncrementBlock, NSObject.Block_setAccessibilityLabelBlock, NSObject.Block_setAccessibilityLanguageBlock, NSObject.Block_setAccessibilityMagicTapBlock, NSObject.Block_setAccessibilityNavigationStyleBlock, NSObject.Block_setAccessibilityPathBlock, NSObject.Block_setAccessibilityPerformEscapeBlock, NSObject.Block_setAccessibilityRespondsToUserInteractionBlock, NSObject.Block_setAccessibilityShouldGroupAccessibilityChildrenBlock, NSObject.Block_setAccessibilityTextualContextBlock, NSObject.Block_setAccessibilityTraitsBlock, NSObject.Block_setAccessibilityUserInputLabelsBlock, NSObject.Block_setAccessibilityValueBlock, NSObject.Block_setAccessibilityViewIsModalBlock, NSObject.Block_setAutomationElementsBlock, NSObject.Block_setIsAccessibilityElementBlock, NSObject.Function_instanceMethodForSelector_ret, NSObject.Function_methodForSelector_ret
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedNSURLRequest(org.moe.natj.general.Pointer peer)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean_supportsSecureCoding()This property must return YES on all classes that allow secure coding.static booleanaccessInstanceVariablesDirectly()@Nullable NSDictionary<java.lang.String,java.lang.String>allHTTPHeaderFields()Returns a dictionary containing all the HTTP header fields of the receiver.static NSURLRequestalloc()static NSURLRequestallocWithZone(org.moe.natj.general.ptr.VoidPtr zone)booleanallowsCellularAccess()returns whether a connection created with this request is allowed to use the built in cellular radios (if present).booleanallowsConstrainedNetworkAccess()returns whether a connection created with this request is allowed to use network interfaces which have been marked as constrained.booleanallowsExpensiveNetworkAccess()returns whether a connection created with this request is allowed to use network interfaces which have been marked as expensive.booleanassumesHTTP3Capable()returns whether we assume that server supports HTTP/3.longattribution()Returns the NSURLRequestAttribution associated with this request.static booleanautomaticallyNotifiesObserversForKey(@NotNull java.lang.String key)longcachePolicy()Returns the cache policy of the receiver.static voidcancelPreviousPerformRequestsWithTarget(@NotNull java.lang.Object aTarget)static voidcancelPreviousPerformRequestsWithTargetSelectorObject(@NotNull java.lang.Object aTarget, @NotNull org.moe.natj.objc.SEL aSelector, @Nullable java.lang.Object anArgument)static @NotNull NSArray<java.lang.String>classFallbacksForKeyedArchiver()static @NotNull org.moe.natj.objc.ClassclassForKeyedUnarchiver()@NotNull java.lang.ObjectcopyWithZone(@Nullable org.moe.natj.general.ptr.VoidPtr zone)static java.lang.StringdebugDescription_static()static java.lang.Stringdescription_static()voidencodeWithCoder(@NotNull NSCoder coder)static longhash_static()@Nullable NSDataHTTPBody()Returns the request body data of the receiver.@Nullable NSInputStreamHTTPBodyStream()Returns the request body stream of the receiver if any has been set The stream is returned for examination only; it is not safe for the caller to manipulate the stream in any way.@Nullable java.lang.StringHTTPMethod()Returns the HTTP request method of the receiver.booleanHTTPShouldHandleCookies()Determine whether default cookie handling will happen for this request.booleanHTTPShouldUsePipelining()Reports whether the receiver is not expected to wait for the previous response before transmitting.NSURLRequestinit()NSURLRequestinitWithCoder(@NotNull NSCoder coder)NS_DESIGNATED_INITIALIZERNSURLRequestinitWithURL(@NotNull NSURL URL)initWithURL: Initializes an NSURLRequest with the given URL.NSURLRequestinitWithURLCachePolicyTimeoutInterval(@NotNull 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 @NotNull NSSet<java.lang.String>keyPathsForValuesAffectingValueForKey(@NotNull java.lang.String key)@Nullable NSURLmainDocumentURL()The main document URL associated with this load.@NotNull java.lang.ObjectmutableCopyWithZone(@Nullable org.moe.natj.general.ptr.VoidPtr zone)longnetworkServiceType()Returns the NSURLRequestNetworkServiceType associated with this request.static NSURLRequestnew_objc()static NSURLRequestrequestWithURL(@NotNull NSURL URL)requestWithURL: Allocates and initializes an NSURLRequest with the given URL.static NSURLRequestrequestWithURLCachePolicyTimeoutInterval(@NotNull NSURL URL, long cachePolicy, double timeoutInterval)requestWithURL:cachePolicy:timeoutInterval: Allocates and initializes a NSURLRequest with the given URL and cache policy.booleanrequiresDNSSECValidation()sets whether a request is required to do DNSSEC validation during DNS lookup.static booleanresolveClassMethod(org.moe.natj.objc.SEL sel)static booleanresolveInstanceMethod(org.moe.natj.objc.SEL sel)static voidsetVersion_static(long aVersion)static org.moe.natj.objc.Classsuperclass_static()static booleansupportsSecureCoding()doubletimeoutInterval()Returns the timeout interval of the receiver.@Nullable NSURLURL()Returns the URL of the receiver.static booleanuseStoredAccessor()Deprecated.@Nullable java.lang.StringvalueForHTTPHeaderField(@NotNull java.lang.String field)valueForHTTPHeaderField: Returns the value which corresponds to the given header field.static longversion_static()-
Methods inherited from class apple.NSObject
accessibilityActivate, accessibilityActivateBlock, accessibilityActivationPoint, accessibilityActivationPointBlock, accessibilityAssistiveTechnologyFocusedIdentifiers, accessibilityAttributedHint, accessibilityAttributedHintBlock, accessibilityAttributedLabel, accessibilityAttributedLabelBlock, accessibilityAttributedUserInputLabels, accessibilityAttributedUserInputLabelsBlock, accessibilityAttributedValue, accessibilityAttributedValueBlock, accessibilityContainerType, accessibilityContainerTypeBlock, accessibilityCustomActions, accessibilityCustomActionsBlock, accessibilityCustomRotors, accessibilityCustomRotorsBlock, accessibilityDecrement, accessibilityDecrementBlock, accessibilityDirectTouchOptions, accessibilityDragSourceDescriptors, accessibilityDropPointDescriptors, accessibilityElementAtIndex, accessibilityElementCount, accessibilityElementDidBecomeFocused, accessibilityElementDidLoseFocus, accessibilityElementIsFocused, accessibilityElements, accessibilityElementsBlock, accessibilityElementsHidden, accessibilityElementsHiddenBlock, accessibilityFrame, accessibilityFrameBlock, accessibilityHeaderElementsBlock, accessibilityHint, accessibilityHintBlock, accessibilityIdentifierBlock, accessibilityIncrement, accessibilityIncrementBlock, accessibilityLabel, accessibilityLabelBlock, accessibilityLanguage, accessibilityLanguageBlock, accessibilityMagicTapBlock, accessibilityNavigationStyle, accessibilityNavigationStyleBlock, accessibilityPath, accessibilityPathBlock, accessibilityPerformEscape, accessibilityPerformEscapeBlock, accessibilityPerformMagicTap, accessibilityRespondsToUserInteraction, accessibilityRespondsToUserInteractionBlock, accessibilityScroll, accessibilityShouldGroupAccessibilityChildrenBlock, accessibilityTextualContext, accessibilityTextualContextBlock, accessibilityTraits, accessibilityTraitsBlock, accessibilityUserInputLabels, accessibilityUserInputLabelsBlock, accessibilityValue, accessibilityValueBlock, accessibilityViewIsModal, accessibilityViewIsModalBlock, accessibilityZoomInAtPoint, accessibilityZoomOutAtPoint, addObserverForKeyPathOptionsContext, attemptRecoveryFromErrorOptionIndex, attemptRecoveryFromErrorOptionIndexDelegateDidRecoverSelectorContextInfo, autoContentAccessingProxy, automationElements, automationElementsBlock, awakeAfterUsingCoder, awakeFromNib, class_objc, classForCoder, classForKeyedArchiver, copy, dealloc, debugDescription, description, dictionaryWithValuesForKeys, didChangeValueForKey, didChangeValueForKeyWithSetMutationUsingObjects, didChangeValuesAtIndexesForKey, doesNotRecognizeSelector, fileManagerShouldProceedAfterError, fileManagerWillProcessPath, finalize_objc, forwardingTargetForSelector, forwardInvocation, handleQueryWithUnboundKey, handleTakeValueForUnboundKey, hash, indexOfAccessibilityElement, isAccessibilityElement, isAccessibilityElementBlock, 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, setAccessibilityActivateBlock, setAccessibilityActivationPoint, setAccessibilityActivationPointBlock, setAccessibilityAttributedHint, setAccessibilityAttributedHintBlock, setAccessibilityAttributedLabel, setAccessibilityAttributedLabelBlock, setAccessibilityAttributedUserInputLabels, setAccessibilityAttributedUserInputLabelsBlock, setAccessibilityAttributedValue, setAccessibilityAttributedValueBlock, setAccessibilityContainerType, setAccessibilityContainerTypeBlock, setAccessibilityCustomActions, setAccessibilityCustomActionsBlock, setAccessibilityCustomRotors, setAccessibilityCustomRotorsBlock, setAccessibilityDecrementBlock, setAccessibilityDirectTouchOptions, setAccessibilityDragSourceDescriptors, setAccessibilityDropPointDescriptors, setAccessibilityElements, setAccessibilityElementsBlock, setAccessibilityElementsHidden, setAccessibilityElementsHiddenBlock, setAccessibilityFrame, setAccessibilityFrameBlock, setAccessibilityHeaderElementsBlock, setAccessibilityHint, setAccessibilityHintBlock, setAccessibilityIdentifierBlock, setAccessibilityIncrementBlock, setAccessibilityLabel, setAccessibilityLabelBlock, setAccessibilityLanguage, setAccessibilityLanguageBlock, setAccessibilityMagicTapBlock, setAccessibilityNavigationStyle, setAccessibilityNavigationStyleBlock, setAccessibilityPath, setAccessibilityPathBlock, setAccessibilityPerformEscapeBlock, setAccessibilityRespondsToUserInteraction, setAccessibilityRespondsToUserInteractionBlock, setAccessibilityShouldGroupAccessibilityChildrenBlock, setAccessibilityTextualContext, setAccessibilityTextualContextBlock, setAccessibilityTraits, setAccessibilityTraitsBlock, setAccessibilityUserInputLabels, setAccessibilityUserInputLabelsBlock, setAccessibilityValue, setAccessibilityValueBlock, setAccessibilityViewIsModal, setAccessibilityViewIsModalBlock, setAutomationElements, setAutomationElementsBlock, setIsAccessibilityElement, setIsAccessibilityElementBlock, setNilValueForKey, setObservationInfo, setShouldGroupAccessibilityChildren, setValueForKey, setValueForKeyPath, setValueForUndefinedKey, setValuesForKeysWithDictionary, shouldGroupAccessibilityChildren, storedValueForKey, superclass, takeStoredValueForKey, takeValueForKey, takeValueForKeyPath, takeValuesFromDictionary, unableToSetNilForKey, validateValueForKeyError, validateValueForKeyPathError, valueForKey, valueForKeyPath, valueForUndefinedKey, valuesForKeys, willChangeValueForKey, willChangeValueForKeyWithSetMutationUsingObjects, willChangeValuesAtIndexesForKey
-
-
-
-
Method Detail
-
accessInstanceVariablesDirectly
public static boolean accessInstanceVariablesDirectly()
-
alloc
public static NSURLRequest alloc()
-
allocWithZone
public static NSURLRequest allocWithZone(org.moe.natj.general.ptr.VoidPtr zone)
-
automaticallyNotifiesObserversForKey
public static boolean automaticallyNotifiesObserversForKey(@NotNull @NotNull java.lang.String key)
-
cancelPreviousPerformRequestsWithTarget
public static void cancelPreviousPerformRequestsWithTarget(@NotNull @NotNull java.lang.Object aTarget)
-
cancelPreviousPerformRequestsWithTargetSelectorObject
public static void cancelPreviousPerformRequestsWithTargetSelectorObject(@NotNull @NotNull java.lang.Object aTarget, @NotNull @NotNull org.moe.natj.objc.SEL aSelector, @Nullable @Nullable java.lang.Object anArgument)
-
classFallbacksForKeyedArchiver
@NotNull public static @NotNull NSArray<java.lang.String> classFallbacksForKeyedArchiver()
-
classForKeyedUnarchiver
@NotNull public static @NotNull 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
@NotNull public static @NotNull NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey(@NotNull @NotNull java.lang.String key)
-
new_objc
public static NSURLRequest new_objc()
-
requestWithURL
public static NSURLRequest requestWithURL(@NotNull @NotNull NSURL URL)
requestWithURL: Allocates and initializes an NSURLRequest with the given URL. Default values are used for cache policy (NSURLRequestUseProtocolCachePolicy) and timeout interval (60 seconds).- Parameters:
URL- The URL for the request.- Returns:
- A newly-created and autoreleased NSURLRequest instance.
-
requestWithURLCachePolicyTimeoutInterval
public static NSURLRequest requestWithURLCachePolicyTimeoutInterval(@NotNull @NotNull NSURL URL, long cachePolicy, double timeoutInterval)
requestWithURL:cachePolicy:timeoutInterval: Allocates and initializes a NSURLRequest with the given URL and cache policy.- 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:
- A newly-created and autoreleased NSURLRequest instance.
-
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
@Nullable public @Nullable NSData HTTPBody()
Returns 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.- Returns:
- The request body data of the receiver.
-
HTTPBodyStream
@Nullable public @Nullable NSInputStream HTTPBodyStream()
Returns the request body stream of the receiver if any has been set The stream is returned for examination only; it is not safe for the caller to manipulate the stream in any way. Also note that the HTTPBodyStream and HTTPBody are mutually exclusive - only one can be set on a given request. Also note that the body stream is preserved across copies, but is LOST when the request is coded via the NSCoding protocol- Returns:
- The request body stream of the receiver.
-
HTTPMethod
@Nullable public @Nullable java.lang.String HTTPMethod()
Returns the HTTP request method of the receiver.- Returns:
- the HTTP request method of the receiver.
-
HTTPShouldHandleCookies
public boolean HTTPShouldHandleCookies()
Determine whether default cookie handling will happen for this request. NOTE: This value is not used prior to 10.3- Returns:
- YES if cookies will be sent with and set for this request; otherwise NO.
-
HTTPShouldUsePipelining
public boolean HTTPShouldUsePipelining()
Reports whether the receiver is not expected to wait for the previous response before transmitting.- 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. API-Since: 4.0
-
URL
@Nullable public @Nullable NSURL URL()
Returns the URL of the receiver.- Returns:
- The URL of the receiver.
-
allHTTPHeaderFields
@Nullable public @Nullable NSDictionary<java.lang.String,java.lang.String> allHTTPHeaderFields()
Returns a dictionary containing all the HTTP header fields of the receiver.- Returns:
- a dictionary containing all the HTTP header fields of the receiver.
-
allowsCellularAccess
public boolean allowsCellularAccess()
returns whether a connection created with this request is allowed to use the built in cellular radios (if present).- Returns:
- YES if the receiver is allowed to use the built in cellular radios to satisfy the request, NO otherwise. API-Since: 6.0
-
cachePolicy
public long cachePolicy()
Returns the cache policy of the receiver.- Returns:
- The cache policy of the receiver.
-
copyWithZone
@NotNull public @NotNull java.lang.Object copyWithZone(@Nullable @Nullable org.moe.natj.general.ptr.VoidPtr zone)- Specified by:
copyWithZonein interfaceNSCopying
-
encodeWithCoder
public void encodeWithCoder(@NotNull @NotNull NSCoder coder)- Specified by:
encodeWithCoderin interfaceNSCoding
-
init
public NSURLRequest init()
-
initWithCoder
public NSURLRequest initWithCoder(@NotNull @NotNull NSCoder coder)
Description copied from interface:NSCodingNS_DESIGNATED_INITIALIZER- Specified by:
initWithCoderin interfaceNSCoding
-
initWithURL
public NSURLRequest initWithURL(@NotNull @NotNull NSURL URL)
initWithURL: Initializes an NSURLRequest with the given URL. Default values are used for cache policy (NSURLRequestUseProtocolCachePolicy) and timeout interval (60 seconds).- Parameters:
URL- The URL for the request.- Returns:
- An initialized NSURLRequest.
-
initWithURLCachePolicyTimeoutInterval
public NSURLRequest initWithURLCachePolicyTimeoutInterval(@NotNull @NotNull NSURL URL, long cachePolicy, double timeoutInterval)
initWithURL: Initializes an NSURLRequest with the given URL and cache policy. This is the designated initializer for the NSURLRequest class.- 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
@Nullable public @Nullable NSURL mainDocumentURL()
The main document URL associated with this load. This URL is used for the cookie "same domain as main document" policy, and attributing the request as a sub-resource of a user-specified URL. There may also be other future uses. See setMainDocumentURL:- Returns:
- The main document URL.
-
mutableCopyWithZone
@NotNull public @NotNull java.lang.Object mutableCopyWithZone(@Nullable @Nullable org.moe.natj.general.ptr.VoidPtr zone)- Specified by:
mutableCopyWithZonein interfaceNSMutableCopying
-
networkServiceType
public long networkServiceType()
Returns the NSURLRequestNetworkServiceType associated with this request. This will return NSURLNetworkServiceTypeDefault for requests that have not explicitly set a networkServiceType (using the setNetworkServiceType method).- Returns:
- The NSURLRequestNetworkServiceType associated with this request. API-Since: 4.0
-
_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
-
timeoutInterval
public double timeoutInterval()
Returns 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.- Returns:
- The timeout interval of the receiver.
-
valueForHTTPHeaderField
@Nullable public @Nullable java.lang.String valueForHTTPHeaderField(@NotNull @NotNull java.lang.String field)valueForHTTPHeaderField: Returns the value which corresponds to the given header field. Note that, in keeping with the HTTP RFC, HTTP header field names are case-insensitive.- Parameters:
field- the header field name to use for the lookup (case-insensitive).- Returns:
- the value associated with the given header field, or nil if there is no value associated with the given header field.
-
allowsConstrainedNetworkAccess
public boolean allowsConstrainedNetworkAccess()
returns whether a connection created with this request is allowed to use network interfaces which have been marked as constrained.- Returns:
- YES if the receiver is allowed to use an interface marked as constrained to satisfy the request, NO otherwise. API-Since: 13.0
-
allowsExpensiveNetworkAccess
public boolean allowsExpensiveNetworkAccess()
returns whether a connection created with this request is allowed to use network interfaces which have been marked as expensive.- Returns:
- YES if the receiver is allowed to use an interface marked as expensive to satisfy the request, NO otherwise. API-Since: 13.0
-
assumesHTTP3Capable
public boolean assumesHTTP3Capable()
returns whether we assume that server supports HTTP/3. Enables QUIC racing without HTTP/3 service discovery.- Returns:
- YES if server endpoint is known to support HTTP/3. Defaults to NO. The default may be YES in a future OS update. API-Since: 14.5
-
attribution
public long attribution()
Returns the NSURLRequestAttribution associated with this request. This will return NSURLRequestAttributionDeveloper for requests that have not explicitly set an attribution.- Returns:
- The NSURLRequestAttribution associated with this request. API-Since: 15.0
-
requiresDNSSECValidation
public boolean requiresDNSSECValidation()
sets whether a request is required to do DNSSEC validation during DNS lookup. YES, if the DNS lookup for this request should require DNSSEC validation, No otherwise. Defaults to NO. API-Since: 16.1
-
useStoredAccessor
@Deprecated public static boolean useStoredAccessor()
Deprecated.
-
-