1

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.

vikifor
  • 3,426
  • 4
  • 45
  • 75

1 Answers1

1

Make sure you create a NSMutableURLRequest and then use the method:

request.setValue("multipart/form-data; boundary=\(boundary)", forHTTPHeaderField: "Content-Type")
David Berry
  • 40,941
  • 12
  • 84
  • 95