     configuration.requestCachePolicy = Moa.settings.cache.requestCachePolicy
     
     #if os(iOS) || os(tvOS)
-    // Cache path is a directory name in iOS
-    let cachePath = Moa.settings.cache.diskPath
+      // Cache path is a directory name in iOS
+      let cachePath = Moa.settings.cache.diskPath
     #elseif os(OSX)
-    // Cache path is a disk path in OSX
-    let cachePath = osxCachePath(Moa.settings.cache.diskPath)
+      // Cache path is a disk path in OSX
+      let cachePath = osxCachePath(Moa.settings.cache.diskPath)
     #endif
     
     let cache = URLCache(

// MoaHttp.swift
//
// ----------------------------
import Foundation

/**
 Shortcut function for creating URLSessionDataTask.
 */
struct MoaHttp {
  static func createDataTask(_ url: String,
                             onSuccess: @escaping (Data?, HTTPURLResponse)->(),
                             onError: @escaping (Error?, HTTPURLResponse?)->()) -> URLSessionDataTask? {
    
    if let urlObject = URL(string: url) {
      return createDataTask(urlObject: urlObject, onSuccess: onSuccess, onError: onError)
    }

  }
  
  private static func validMimeType(_ mimeType: String) -> Bool {
    let validMimeTypes = ["image/jpeg", "image/jpg", "image/pjpeg", "image/png", "image/gif", "application/octet-stream"]
    return validMimeTypes.contains(mimeType)
  }
}
