---
title: "init(forServiceType:requestMethod:url:parameters:)"
framework: social
role: symbol
role_heading: Initializer
path: "social/slrequest/init(forservicetype:requestmethod:url:parameters:)-2cnf1"
---

# init(forServiceType:requestMethod:url:parameters:)

Initializes a newly created request object with the specified properties.

## Declaration

```swift
init!(forServiceType serviceType: String!, requestMethod: SLRequestMethod, url: URL!, parameters: [AnyHashable : Any]!)
```

## Parameters

- `serviceType`: The social networking service type. For possible values, see Service Type Constants.
- `requestMethod`: The method to use for this HTTP request. For possible values, see doc://com.apple.social/documentation/Social/SLRequestMethod.
- `url`: The destination URL for this HTTP request. The values and formatting for the URL 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 doc://com.apple.social/documentation/Social/SLRequest.
- `parameters`: The parameters for this HTTP request. The values and formatting 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 doc://com.apple.social/documentation/Social/SLRequest.

## Return Value

Return Value The newly initialized request object.

## Discussion

Discussion Use this method to initialize an SLRequest. The value and formatting of each parameter is dependent on the target service.

## See Also

### Initializing Requests

- [SLServiceTypeFacebook](social/slservicetypefacebook.md)
- [SLServiceTypeTwitter](social/slservicetypetwitter.md)
- [SLServiceTypeSinaWeibo](social/slservicetypesinaweibo.md)
- [SLServiceTypeLinkedIn](social/slservicetypelinkedin.md)
- [SLServiceTypeTencentWeibo](social/slservicetypetencentweibo.md)
