I'm translating some code from Android to iOS. To be more specific, I'm converting a multipart Http Post.
In Android there's a static method guessContentTypeFromName for the class URLConnection that returns the correct MIME-type from a given filename as input. The result is used as value for "Content-Type" parameter of the request.
You can read documentation about this method here: http://developer.android.com/reference/java/net/URLConnection.html#guessContentTypeFromName(java.lang.String)
I read the source of this method and, roughly speaking, there's a java map that contains Mime-Type/file extension association to extract Mime-type from filename extension.
As my knowledge, there's not such equivalent in the Cocoa Touch framework, so I'm asking how can I implement something similar. Of course if something similar exists, I need to be addressed to the right point.
Thank you in advance