setNetworkServiceType:
Sets the network service type of the connection.
- (void)setNetworkServiceType:(NSURLRequestNetworkServiceType)networkServiceType
Parameters of [NSMutableURLRequest setNetworkServiceType]
- networkServiceType
- The network service type.
Example of [NSMutableURLRequest setNetworkServiceType]
[request setNetworkServiceType:NSURLNetworkServiceTypeVoIP];
Example of [NSMutableURLRequest setNetworkServiceType]
- NSURL *url = [NSURL URLWithString:@"YOUR URL HERE"];
- NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url];
- [request setNetworkServiceType:NSURLNetworkServiceTypeVoIP];
- NSURLResponse *response = nil;
- NSError *error = nil;
- NSData *data = [NSURLConnection sendSynchronousRequest:request
- returningResponse:&response
- error:&error];