> ## Documentation Index
> Fetch the complete documentation index at: https://dev.marginnote.com.cn/llms.txt
> Use this file to discover all available pages before exploring further.

# NSURLConnection

> Native instance exported as .

Native instance exported as `NSURLConnection`.

## Methods

### allowsWeakReference()

```typescript
allowsWeakReference(): boolean
```

Exported member.

#### Returns

`boolean`

### autorelease()

```typescript
autorelease(): unknown
```

Exported member.

#### Returns

`unknown`

### cancel()

```typescript
cancel(): void
```

Exported member.

### class()

```typescript
class(): NativeClass<NativeObject>
```

Exported member.

#### Returns

`NativeClass<NativeObject>`

### conformsToProtocol()

```typescript
conformsToProtocol(_aProtocol: Protocol | null): boolean
```

Exported member.

#### Parameters

**\_aProtocol** `Protocol | null` *required*

#### Returns

`boolean`

### connectionCanAuthenticateAgainstProtectionSpace()

```typescript
connectionCanAuthenticateAgainstProtectionSpace(_connection: NSURLConnection | null, _protectionSpace: NSURLProtectionSpace | null): boolean
```

Exported member.

#### Parameters

**\_connection** `NSURLConnection | null` *required*

**Type:** `NSURLConnection | null`

**\_protectionSpace** `NSURLProtectionSpace | null` *required*

#### Returns

`boolean`

### connectionDidCancelAuthenticationChallenge()

```typescript
connectionDidCancelAuthenticationChallenge(_connection: NSURLConnection | null, _challenge: NSURLAuthenticationChallenge | null): void
```

Exported member.

#### Parameters

**\_connection** `NSURLConnection | null` *required*

**Type:** `NSURLConnection | null`

**\_challenge** `NSURLAuthenticationChallenge | null` *required*

### connectionDidFailWithError()

```typescript
connectionDidFailWithError(_connection: NSURLConnection | null, _error: NSError | null): void
```

Exported member.

#### Parameters

**\_connection** `NSURLConnection | null` *required*

**Type:** `NSURLConnection | null`

**\_error** `NSError | null` *required*

**Type:** `NSError | null`

### connectionDidFinishDownloadingDestinationURL()

```typescript
connectionDidFinishDownloadingDestinationURL(_connection: NSURLConnection | null, _destinationURL: NSURL | null): void
```

Exported member.

#### Parameters

**\_connection** `NSURLConnection | null` *required*

**Type:** `NSURLConnection | null`

**\_destinationURL** `NSURL | null` *required*

**Type:** `NSURL | null`

### connectionDidFinishLoading()

```typescript
connectionDidFinishLoading(_connection: NSURLConnection | null): void
```

Exported member.

#### Parameters

**\_connection** `NSURLConnection | null` *required*

**Type:** `NSURLConnection | null`

### connectionDidReceiveAuthenticationChallenge()

```typescript
connectionDidReceiveAuthenticationChallenge(_connection: NSURLConnection | null, _challenge: NSURLAuthenticationChallenge | null): void
```

Exported member.

#### Parameters

**\_connection** `NSURLConnection | null` *required*

**Type:** `NSURLConnection | null`

**\_challenge** `NSURLAuthenticationChallenge | null` *required*

### connectionDidReceiveData()

```typescript
connectionDidReceiveData(_connection: NSURLConnection | null, _data: NSData | null): void
```

Exported member.

#### Parameters

**\_connection** `NSURLConnection | null` *required*

**Type:** `NSURLConnection | null`

**\_data** `NSData | null` *required*

**Type:** `NSData | null`

### connectionDidReceiveResponse()

```typescript
connectionDidReceiveResponse(_connection: NSURLConnection | null, _response: NSURLResponse | null): void
```

Exported member.

#### Parameters

**\_connection** `NSURLConnection | null` *required*

**Type:** `NSURLConnection | null`

**\_response** `NSURLResponse | null` *required*

**Type:** `NSURLResponse | null`

### connectionDidResumeDownloadingTotalBytesWrittenExpectedTotalBytes()

```typescript
connectionDidResumeDownloadingTotalBytesWrittenExpectedTotalBytes(_connection: NSURLConnection | null, _totalBytesWritten: number, _expectedTotalBytes: number): void
```

Exported member.

#### Parameters

**\_connection** `NSURLConnection | null` *required*

**Type:** `NSURLConnection | null`

**\_totalBytesWritten** `number` *required*

**\_expectedTotalBytes** `number` *required*

### connectionDidSendBodyDataTotalBytesWrittenTotalBytesExpectedToWrite()

```typescript
connectionDidSendBodyDataTotalBytesWrittenTotalBytesExpectedToWrite(_connection: NSURLConnection | null, _bytesWritten: number, _totalBytesWritten: number, _totalBytesExpectedToWrite: number): void
```

Exported member.

#### Parameters

**\_connection** `NSURLConnection | null` *required*

**Type:** `NSURLConnection | null`

**\_bytesWritten** `number` *required*

**\_totalBytesWritten** `number` *required*

**\_totalBytesExpectedToWrite** `number` *required*

### connectionDidWriteDataTotalBytesWrittenExpectedTotalBytes()

```typescript
connectionDidWriteDataTotalBytesWrittenExpectedTotalBytes(_connection: NSURLConnection | null, _bytesWritten: number, _totalBytesWritten: number, _expectedTotalBytes: number): void
```

Exported member.

#### Parameters

**\_connection** `NSURLConnection | null` *required*

**Type:** `NSURLConnection | null`

**\_bytesWritten** `number` *required*

**\_totalBytesWritten** `number` *required*

**\_expectedTotalBytes** `number` *required*

### connectionNeedNewBodyStream()

```typescript
connectionNeedNewBodyStream(_connection: NSURLConnection | null, _request: NSURLRequest | null): NSInputStream | null
```

Exported member.

#### Parameters

**\_connection** `NSURLConnection | null` *required*

**Type:** `NSURLConnection | null`

**\_request** `NSURLRequest | null` *required*

**Type:** `NSURLRequest | null`

#### Returns

`NSInputStream | null`

### connectionShouldUseCredentialStorage()

```typescript
connectionShouldUseCredentialStorage(_connection: NSURLConnection | null): boolean
```

Exported member.

#### Parameters

**\_connection** `NSURLConnection | null` *required*

**Type:** `NSURLConnection | null`

#### Returns

`boolean`

### connectionWillCacheResponse()

```typescript
connectionWillCacheResponse(_connection: NSURLConnection | null, _cachedResponse: NSCachedURLResponse | null): NSCachedURLResponse | null
```

Exported member.

#### Parameters

**\_connection** `NSURLConnection | null` *required*

**Type:** `NSURLConnection | null`

**\_cachedResponse** `NSCachedURLResponse | null` *required*

#### Returns

`NSCachedURLResponse | null`

### connectionWillSendRequestForAuthenticationChallenge()

```typescript
connectionWillSendRequestForAuthenticationChallenge(_connection: NSURLConnection | null, _challenge: NSURLAuthenticationChallenge | null): void
```

Exported member.

#### Parameters

**\_connection** `NSURLConnection | null` *required*

**Type:** `NSURLConnection | null`

**\_challenge** `NSURLAuthenticationChallenge | null` *required*

### connectionWillSendRequestRedirectResponse()

```typescript
connectionWillSendRequestRedirectResponse(_connection: NSURLConnection | null, _request: NSURLRequest | null, _response: NSURLResponse | null): NSURLRequest | null
```

Exported member.

#### Parameters

**\_connection** `NSURLConnection | null` *required*

**Type:** `NSURLConnection | null`

**\_request** `NSURLRequest | null` *required*

**Type:** `NSURLRequest | null`

**\_response** `NSURLResponse | null` *required*

**Type:** `NSURLResponse | null`

#### Returns

`NSURLRequest | null`

### copy()

```typescript
copy(): unknown
```

Exported member.

#### Returns

`unknown`

### currentRequest()

```typescript
currentRequest(): NSURLRequest | null
```

Exported member.

#### Returns

`NSURLRequest | null`

### dealloc()

```typescript
dealloc(): void
```

Exported member.

### debugDescription()

```typescript
debugDescription(): string | null
```

Exported member.

#### Returns

`string | null`

### description()

```typescript
description(): string | null
```

Exported member.

#### Returns

`string | null`

### doesNotRecognizeSelector()

```typescript
doesNotRecognizeSelector(_aSelector: string | null): void
```

Exported member.

#### Parameters

**\_aSelector** `string | null` *required*

### finalize()

```typescript
finalize(): void
```

Exported member.

### forwardingTargetForSelector()

```typescript
forwardingTargetForSelector(_aSelector: string | null): unknown
```

Exported member.

#### Parameters

**\_aSelector** `string | null` *required*

#### Returns

`unknown`

### forwardInvocation()

```typescript
forwardInvocation(_anInvocation: NSInvocation | null): void
```

Exported member.

#### Parameters

**\_anInvocation** `NSInvocation | null` *required*

### hash()

```typescript
hash(): number
```

Exported member.

#### Returns

`number`

### isEqual()

```typescript
isEqual(_object: unknown): boolean
```

Exported member.

#### Parameters

**\_object** `unknown` *required*

#### Returns

`boolean`

### isKindOfClass()

```typescript
isKindOfClass(_aClass: NativeClass<NativeObject>): boolean
```

Exported member.

#### Parameters

**\_aClass** `NativeClass\<NativeObject\>` *required*

#### Returns

`boolean`

### isMemberOfClass()

```typescript
isMemberOfClass(_aClass: NativeClass<NativeObject>): boolean
```

Exported member.

#### Parameters

**\_aClass** `NativeClass\<NativeObject\>` *required*

#### Returns

`boolean`

### isProxy()

```typescript
isProxy(): boolean
```

Exported member.

#### Returns

`boolean`

### methodForSelector()

```typescript
methodForSelector(_aSelector: NativeSelector): IMP
```

Exported member.

#### Parameters

**\_aSelector** `NativeSelector` *required*

#### Returns

`IMP`

### methodSignatureForSelector()

```typescript
methodSignatureForSelector(_aSelector: string | null): NSMethodSignature | null
```

Exported member.

#### Parameters

**\_aSelector** `string | null` *required*

#### Returns

`NSMethodSignature | null`

### mutableCopy()

```typescript
mutableCopy(): unknown
```

Exported member.

#### Returns

`unknown`

### originalRequest()

```typescript
originalRequest(): NSURLRequest | null
```

Exported member.

#### Returns

`NSURLRequest | null`

### performSelector()

```typescript
performSelector(_aSelector: string | null): unknown
```

Exported member.

#### Parameters

**\_aSelector** `string | null` *required*

#### Returns

`unknown`

### performSelectorWithObject()

```typescript
performSelectorWithObject(_aSelector: string | null, _object: unknown): unknown
```

Exported member.

#### Parameters

**\_aSelector** `string | null` *required*

**\_object** `unknown` *required*

#### Returns

`unknown`

### performSelectorWithObjectWithObject()

```typescript
performSelectorWithObjectWithObject(_aSelector: string | null, _object1: unknown, _object2: unknown): unknown
```

Exported member.

#### Parameters

**\_aSelector** `string | null` *required*

**\_object1** `unknown` *required*

**\_object2** `unknown` *required*

#### Returns

`unknown`

### release()

```typescript
release(): void
```

Exported member.

### respondsToSelector()

```typescript
respondsToSelector(_aSelector: NativeSelector): boolean
```

Exported member.

#### Parameters

**\_aSelector** `NativeSelector` *required*

#### Returns

`boolean`

### retain()

```typescript
retain(): unknown
```

Exported member.

#### Returns

`unknown`

### retainCount()

```typescript
retainCount(): number
```

Exported member.

#### Returns

`number`

### retainWeakReference()

```typescript
retainWeakReference(): boolean
```

Exported member.

#### Returns

`boolean`

### scheduleInRunLoopForMode()

```typescript
scheduleInRunLoopForMode(_aRunLoop: NSRunLoop | null, _mode: string | null): void
```

Exported member.

#### Parameters

**\_aRunLoop** `NSRunLoop | null` *required*

**\_mode** `string | null` *required*

### self()

```typescript
self(): unknown
```

Exported member.

#### Returns

`unknown`

### setDelegateQueue()

```typescript
setDelegateQueue(_queue: NSOperationQueue | null): void
```

Exported member.

#### Parameters

**\_queue** `NSOperationQueue | null` *required*

**Type:** `NSOperationQueue | null`

### start()

```typescript
start(): void
```

Exported member.

### superclass()

```typescript
superclass(): NativeClass<NativeObject>
```

Exported member.

#### Returns

`NativeClass<NativeObject>`

### unscheduleFromRunLoopForMode()

```typescript
unscheduleFromRunLoopForMode(_aRunLoop: NSRunLoop | null, _mode: string | null): void
```

Exported member.

#### Parameters

**\_aRunLoop** `NSRunLoop | null` *required*

**\_mode** `string | null` *required*

### zone()

```typescript
zone(): NativePointer | null
```

Exported member.

#### Returns

`NativePointer | null`


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.