Code:
var request = NSMutableURLRequest(URL: strURl, cachePolicy:NSURLRequestCachePolicy, timeoutInterval:60.0)
What is wrong with my code? How do I solve below error:
Expected member name or constructor call after type name
any help will be appreciated.
NSURLRequestCachePolicy
is an enum, you need to pick one of its values. You can get a list of them and what they do here.
For example, if you want to use the default cache policy, you'd do:
var request = NSMutableURLRequest(URL: strURl, cachePolicy:NSURLRequestCachePolicy.UseProtocolCachePolicy, timeoutInterval:60.0)