// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.IO;
using System.Threading;
using System.Threading.Tasks;
namespace Microsoft.AspNet.Http
{
public abstract class HttpRequest
{
public abstract HttpContext HttpContext { get; }
///
/// Gets or set the HTTP method.
///
/// The HTTP method.
public abstract string Method { get; set; }
///
/// Gets or set the HTTP request scheme from owin.RequestScheme.
///
/// The HTTP request scheme from owin.RequestScheme.
public abstract string Scheme { get; set; }
///
/// Returns true if the owin.RequestScheme is https.
///
/// true if this request is using https; otherwise, false.
public abstract bool IsHttps { get; }
///
/// Gets or set the Host header. May include the port.
///
/// The Host header.
public abstract HostString Host { get; set; }
///
/// Gets or set the owin.RequestPathBase.
///
/// The owin.RequestPathBase.
public abstract PathString PathBase { get; set; }
///
/// Gets or set the request path from owin.RequestPath.
///
/// The request path from owin.RequestPath.
public abstract PathString Path { get; set; }
///
/// Gets or set the query string from owin.RequestQueryString.
///
/// The query string from owin.RequestQueryString.
public abstract QueryString QueryString { get; set; }
///
/// Gets the query value collection parsed from owin.RequestQueryString.
///
/// The query value collection parsed from owin.RequestQueryString.
public abstract IReadableStringCollection Query { get; }
///
/// Gets or set the owin.RequestProtocol.
///
/// The owin.RequestProtocol.
public abstract string Protocol { get; set; }
///
/// Gets the request headers.
///
/// The request headers.
public abstract IHeaderDictionary Headers { get; }
///
/// Gets the collection of Cookies for this request.
///
/// The collection of Cookies for this request.
public abstract IReadableStringCollection Cookies { get; }
///
/// Gets or sets the Content-Length header
///
public abstract long? ContentLength { get; set; }
///
/// Gets or sets the Content-Type header.
///
/// The Content-Type header.
public abstract string ContentType { get; set; }
///
/// Gets or set the owin.RequestBody Stream.
///
/// The owin.RequestBody Stream.
public abstract Stream Body { get; set; }
///
/// Checks the content-type header for form types.
///
public abstract bool HasFormContentType { get; }
///
/// Gets or sets the request body as a form.
///
public abstract IFormCollection Form { get; set; }
///
/// Reads the request body if it is a form.
///
///
public abstract Task ReadFormAsync(CancellationToken cancellationToken = new CancellationToken());
}
}