<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.1.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSMutableURLRequest/bind(to:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSMutableURLRequest(im)bindToHotspotHelperCommand:"
  },
  "title" : "bind(to:)"
}
-->

# bind(to:)

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

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

## Parameters

`command`

The hotspot helper command to bind the request to.

## Discussion

Apps that participate in joining Wi-Fi hotspot networks use the APIs in the <doc://com.apple.documentation/documentation/NetworkExtension> framework to authenticate with hotspots. Ordinarily, [`URLSession`](/documentation/Foundation/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

  <doc://com.apple.documentation/documentation/NetworkExtension>



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)