// Copyright © 2010-2015 The CefSharp Authors. All rights reserved.
//
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
using System.Collections.Specialized;
using System.IO;
namespace CefSharp
{
public interface IResourceHandlerResponse
{
///
/// A Stream with the response data. If the request didn't return any response, leave this property as null.
///
Stream ResponseStream { get; set; }
///
/// MimeType
///
string MimeType { get; set; }
///
/// Response Headers
///
NameValueCollection ResponseHeaders { get; set; }
///
/// The status code of the response. Unless set, the default value used is 200
/// (corresponding to HTTP status OK).
///
int StatusCode { get; set; }
string StatusText { get; set; }
///
/// The length of the response contents. Defaults to -1, which means unknown length
/// and causes CefSharp to read the response stream in pieces. Thus, setting a length
/// is optional but allows for more optimal response reading.
///
long ContentLength { get; set; }
///
/// URL to redirect to (leave empty to not redirect).
///
string RedirectUrl { get; set; }
///
/// Set to true to close the response stream once it has been read. The default value
/// is false in order to preserve the old CefSharp behavior of not closing the stream.
///
bool CloseStream { get; set; }
///
/// Execute this method when processing is complete. Can be called on any thread.
///
void ProcessRequestCallback();
}
}