// 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;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
namespace Microsoft.AspNet.Http
{
public abstract class HttpRequest
{
// TODO - review IOwinRequest for properties
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 IsSecure { 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 the form collection.
///
/// The form collection parsed from the request body.
public abstract Task GetFormAsync(CancellationToken cancellationToken = default(CancellationToken));
///
/// 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.
// (TODO header conventions?) public abstract string ContentType { get; set; }
///
/// Gets or sets the Cache-Control header.
///
/// The Cache-Control header.
// (TODO header conventions?) public abstract string CacheControl { get; set; }
///
/// Gets or sets the Media-Type header.
///
/// The Media-Type header.
// (TODO header conventions?) public abstract string MediaType { get; set; }
///
/// Gets or set the Accept header.
///
/// The Accept header.
// (TODO header conventions?) public abstract string Accept { get; set; }
///
/// Gets or set the owin.RequestBody Stream.
///
/// The owin.RequestBody Stream.
public abstract Stream Body { get; set; }
}
}