Explorar o código

Add "text/plain" header

Anton %!s(int64=10) %!d(string=hai) anos
pai
achega
ef18900902
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      Sources/HttpResponse.swift

+ 1 - 0
Sources/HttpResponse.swift

@@ -113,6 +113,7 @@ public enum HttpResponse {
             }
         case .OK(let body):
             switch body {
+            case .Text(_)   : headers["Content-Type"] = "text/plain"
             case .Json(_)   : headers["Content-Type"] = "application/json"
             case .Html(_)   : headers["Content-Type"] = "text/html"
             default:break