Subtext.Framework.Web.Handlers.RsdHandler.HandleRequest C# (CSharp) Method

HandleRequest() public method

Handles the request. This is where you put your business logic.

This method should result in a call to one (or more) of the following methods:

context.Response.BinaryWrite();

context.Response.Write();

context.Response.WriteFile();

someStream.Save(context.Response.OutputStream);

etc...

If you want a download box to show up with a pre-populated filename, add this call here (supplying a real filename).

Response.AddHeader("Content-Disposition" , "attachment; filename=\"" + Filename + "\"");

public HandleRequest ( HttpContext context ) : void
context System.Web.HttpContext Context.
return void
        public override void HandleRequest(HttpContext context)
        {
            if(Config.CurrentBlog == null)
                return;

            context.Response.Charset = "utf-8";

            XmlWriterSettings settings = new XmlWriterSettings();
            settings.Indent = true;
            settings.IndentChars = "  ";
            settings.Encoding = Encoding.UTF8;
            XmlWriter writer = XmlWriter.Create(context.Response.OutputStream, settings);
            WriteRsd(writer, Config.CurrentBlog);
        }