<!--
{
  "availability" : [
    "iOS: 6.0.0 -",
    "iPadOS: 6.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.8.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Social",
  "identifier" : "/documentation/Social/SLRequestHandler",
  "metadataVersion" : "0.1.0",
  "role" : "Type Alias",
  "symbol" : {
    "kind" : "Type Alias",
    "modules" : [
      "Social"
    ],
    "preciseIdentifier" : "c:@T@SLRequestHandler"
  },
  "title" : "SLRequestHandler"
}
-->

# SLRequestHandler

The callback handler for a request.

```
typealias SLRequestHandler = (Data?, HTTPURLResponse?, (any Error)?) -> Void
```

## Discussion

The parameters for this handler are:

- `responseData`: The data returned by the request. The format of this data is dependent on the target service.
- `urlResponse`: The URL response returned by the request that includes the HTTP response codes.
- `error`: An error identifier.

Possible values are dependent on the target service and are documented by the service provider. For links to documentation for the supported services, see Table 1 in [`SLRequest`](/documentation/Social/SLRequest).

---

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)