Apachai.ContextExtensions.RawServing C# (CSharp) Method

RawServing() public static method

public static RawServing ( this response, string mime, int maxAge, string data ) : void
response this
mime string
maxAge int
data string
return void
        public static void RawServing(this IHttpResponse response, string mime, int maxAge, string data)
        {
            response.Headers.SetNormalizedHeader ("Content-Type", "Content-Type: "+mime+"; charset=utf-8");
            response.Headers.SetNormalizedHeader ("Cache-Control", "max-age=" + maxAge);
            response.End (Encoding.UTF8.GetBytes (data));
        }