NSURLProtocolClient class interface

NSURLProtocolClient

Constructors

NSURLProtocolClient.castFrom(ObjCObjectBase other)
Constructs a NSURLProtocolClient that points to the same underlying object as other.
NSURLProtocolClient.castFromPointer(Pointer<ObjCObject> other, {bool retain = false, bool release = false})
Constructs a NSURLProtocolClient that wraps the given raw object pointer.

Properties

hashCode → int
The hash code for this object.
no setterinherited
ref → ObjCObjectRef
finalinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Properties

$protocol → Protocol
Returns the objc.Protocol object for this protocol.
no setter
URLProtocol_cachedResponseIsValid_ → ObjCProtocolListenableMethod<void Function(NSURLProtocol, NSCachedURLResponse)>
URLProtocol:cachedResponseIsValid:
final
URLProtocol_didCancelAuthenticationChallenge_ → ObjCProtocolListenableMethod<void Function(NSURLProtocol, NSURLAuthenticationChallenge)>
URLProtocol:didCancelAuthenticationChallenge:
final
URLProtocol_didFailWithError_ → ObjCProtocolListenableMethod<void Function(NSURLProtocol, NSError)>
URLProtocol:didFailWithError:
final
URLProtocol_didLoadData_ → ObjCProtocolListenableMethod<void Function(NSURLProtocol, NSData)>
URLProtocol:didLoadData:
final
URLProtocol_didReceiveAuthenticationChallenge_ → ObjCProtocolListenableMethod<void Function(NSURLProtocol, NSURLAuthenticationChallenge)>
URLProtocol:didReceiveAuthenticationChallenge:
final
URLProtocol_didReceiveResponse_cacheStoragePolicy_ → ObjCProtocolListenableMethod<void Function(NSURLProtocol, NSURLResponse, NSURLCacheStoragePolicy)>
URLProtocol:didReceiveResponse:cacheStoragePolicy:
final
URLProtocol_wasRedirectedToRequest_redirectResponse_ → ObjCProtocolListenableMethod<void Function(NSURLProtocol, NSURLRequest, NSURLResponse)>
URLProtocol:wasRedirectedToRequest:redirectResponse:
final
URLProtocolDidFinishLoading_ → ObjCProtocolListenableMethod<void Function(NSURLProtocol)>
URLProtocolDidFinishLoading:
final

Static Methods

addToBuilder(ObjCProtocolBuilder builder, {required void URLProtocol_wasRedirectedToRequest_redirectResponse_(NSURLProtocol, NSURLRequest, NSURLResponse), required void URLProtocol_cachedResponseIsValid_(NSURLProtocol, NSCachedURLResponse), required void URLProtocol_didReceiveResponse_cacheStoragePolicy_(NSURLProtocol, NSURLResponse, NSURLCacheStoragePolicy), required void URLProtocol_didLoadData_(NSURLProtocol, NSData), required void URLProtocolDidFinishLoading_(NSURLProtocol), required void URLProtocol_didFailWithError_(NSURLProtocol, NSError), required void URLProtocol_didReceiveAuthenticationChallenge_(NSURLProtocol, NSURLAuthenticationChallenge), required void URLProtocol_didCancelAuthenticationChallenge_(NSURLProtocol, NSURLAuthenticationChallenge), bool $keepIsolateAlive = true}) → void
Adds the implementation of the NSURLProtocolClient protocol to an existing objc.ObjCProtocolBuilder.
addToBuilderAsBlocking(ObjCProtocolBuilder builder, {required void URLProtocol_wasRedirectedToRequest_redirectResponse_(NSURLProtocol, NSURLRequest, NSURLResponse), required void URLProtocol_cachedResponseIsValid_(NSURLProtocol, NSCachedURLResponse), required void URLProtocol_didReceiveResponse_cacheStoragePolicy_(NSURLProtocol, NSURLResponse, NSURLCacheStoragePolicy), required void URLProtocol_didLoadData_(NSURLProtocol, NSData), required void URLProtocolDidFinishLoading_(NSURLProtocol), required void URLProtocol_didFailWithError_(NSURLProtocol, NSError), required void URLProtocol_didReceiveAuthenticationChallenge_(NSURLProtocol, NSURLAuthenticationChallenge), required void URLProtocol_didCancelAuthenticationChallenge_(NSURLProtocol, NSURLAuthenticationChallenge), bool $keepIsolateAlive = true}) → void
Adds the implementation of the NSURLProtocolClient protocol to an existing objc.ObjCProtocolBuilder. All methods that can be implemented as blocking listeners will be.
addToBuilderAsListener(ObjCProtocolBuilder builder, {required void URLProtocol_wasRedirectedToRequest_redirectResponse_(NSURLProtocol, NSURLRequest, NSURLResponse), required void URLProtocol_cachedResponseIsValid_(NSURLProtocol, NSCachedURLResponse), required void URLProtocol_didReceiveResponse_cacheStoragePolicy_(NSURLProtocol, NSURLResponse, NSURLCacheStoragePolicy), required void URLProtocol_didLoadData_(NSURLProtocol, NSData), required void URLProtocolDidFinishLoading_(NSURLProtocol), required void URLProtocol_didFailWithError_(NSURLProtocol, NSError), required void URLProtocol_didReceiveAuthenticationChallenge_(NSURLProtocol, NSURLAuthenticationChallenge), required void URLProtocol_didCancelAuthenticationChallenge_(NSURLProtocol, NSURLAuthenticationChallenge), bool $keepIsolateAlive = true}) → void
Adds the implementation of the NSURLProtocolClient protocol to an existing objc.ObjCProtocolBuilder. All methods that can be implemented as listeners will be.
conformsTo(ObjCObjectBase obj) → bool
Returns whether obj is an instance of NSURLProtocolClient.
implement({required void URLProtocol_wasRedirectedToRequest_redirectResponse_(NSURLProtocol, NSURLRequest, NSURLResponse), required void URLProtocol_cachedResponseIsValid_(NSURLProtocol, NSCachedURLResponse), required void URLProtocol_didReceiveResponse_cacheStoragePolicy_(NSURLProtocol, NSURLResponse, NSURLCacheStoragePolicy), required void URLProtocol_didLoadData_(NSURLProtocol, NSData), required void URLProtocolDidFinishLoading_(NSURLProtocol), required void URLProtocol_didFailWithError_(NSURLProtocol, NSError), required void URLProtocol_didReceiveAuthenticationChallenge_(NSURLProtocol, NSURLAuthenticationChallenge), required void URLProtocol_didCancelAuthenticationChallenge_(NSURLProtocol, NSURLAuthenticationChallenge), bool $keepIsolateAlive = true}) → NSURLProtocolClient
Builds an object that implements the NSURLProtocolClient protocol. To implement multiple protocols, use addToBuilder or objc.ObjCProtocolBuilder directly.
implementAsBlocking({required void URLProtocol_wasRedirectedToRequest_redirectResponse_(NSURLProtocol, NSURLRequest, NSURLResponse), required void URLProtocol_cachedResponseIsValid_(NSURLProtocol, NSCachedURLResponse), required void URLProtocol_didReceiveResponse_cacheStoragePolicy_(NSURLProtocol, NSURLResponse, NSURLCacheStoragePolicy), required void URLProtocol_didLoadData_(NSURLProtocol, NSData), required void URLProtocolDidFinishLoading_(NSURLProtocol), required void URLProtocol_didFailWithError_(NSURLProtocol, NSError), required void URLProtocol_didReceiveAuthenticationChallenge_(NSURLProtocol, NSURLAuthenticationChallenge), required void URLProtocol_didCancelAuthenticationChallenge_(NSURLProtocol, NSURLAuthenticationChallenge), bool $keepIsolateAlive = true}) → NSURLProtocolClient
Builds an object that implements the NSURLProtocolClient protocol. To implement multiple protocols, use addToBuilder or objc.ObjCProtocolBuilder directly. All methods that can be implemented as blocking listeners will be.
implementAsListener({required void URLProtocol_wasRedirectedToRequest_redirectResponse_(NSURLProtocol, NSURLRequest, NSURLResponse), required void URLProtocol_cachedResponseIsValid_(NSURLProtocol, NSCachedURLResponse), required void URLProtocol_didReceiveResponse_cacheStoragePolicy_(NSURLProtocol, NSURLResponse, NSURLCacheStoragePolicy), required void URLProtocol_didLoadData_(NSURLProtocol, NSData), required void URLProtocolDidFinishLoading_(NSURLProtocol), required void URLProtocol_didFailWithError_(NSURLProtocol, NSError), required void URLProtocol_didReceiveAuthenticationChallenge_(NSURLProtocol, NSURLAuthenticationChallenge), required void URLProtocol_didCancelAuthenticationChallenge_(NSURLProtocol, NSURLAuthenticationChallenge), bool $keepIsolateAlive = true}) → NSURLProtocolClient
Builds an object that implements the NSURLProtocolClient protocol. To implement multiple protocols, use addToBuilder or objc.ObjCProtocolBuilder directly. All methods that can be implemented as listeners will be.