---
title: "bind(to:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/nsmutableurlrequest/bind(to:)"
---

# bind(to:)

Binds a URL request to the network interface associated with the hotspot helper command instance.

## Declaration

```swift
func bind(to command: NEHotspotHelperCommand)
```

## Parameters

- `command`: The hotspot helper command to bind the request to.

## Discussion

Discussion Apps that participate in joining Wi-Fi hotspot networks use the APIs in the Network Extension framework to authenticate with hotspots. Ordinarily, URLSession will use the default interface, which may be WWAN. By binding to a hotspot helper command, you force a request to use Wi-Fi to communicate with the hotspot.

## See Also

### Related Documentation

- [Network Extension](networkextension.md)
