---
title: preparedURLRequest()
framework: social
role: symbol
role_heading: Instance Method
path: social/slrequest/preparedurlrequest()
---

# preparedURLRequest()

Returns an authorized URL request that can be sent using an NSURLConnection object.

## Declaration

```swift
func preparedURLRequest() -> URLRequest!
```

## Return Value

Return Value An OAuth-compatible NSURLRequest object that allows an app to act on behalf of the user, while keeping the user’s password private. The NSURLRequest is signed as OAuth1 by default, or OAuth2 by adding the appropriate token based on the user’s account.

## Discussion

Discussion Use this method to modify your request before sending. By setting the account correctly, this method will automatically add any necessary tokens.

## See Also

### Getting the Request Details

- [requestMethod](social/slrequest/requestmethod.md)
- [SLRequestMethod](social/slrequestmethod.md)
- [url](social/slrequest/url.md)
- [parameters](social/slrequest/parameters.md)
