Reputation: 3466
I have iOS8 swift application which communicate to web service URL. However, I do not like to have access to my web service from device that is not mobile device. How can I achive this using iOS8 swift application. In fact I need HTTP header, that have device-specific information using NSURLConnection.
Upvotes: 1
Views: 1620
Reputation: 41226
Make sure you create a NSMutableURLRequest
and then use the method:
request.setValue("multipart/form-data; boundary=\(boundary)", forHTTPHeaderField: "Content-Type")
Upvotes: 1