Skip to main content

MockHttpRequest

Assembly: ServiceStack.dll
View Source
Declaration
public class MockHttpRequest : IHttpRequest, IRequest, IResolver, IHasResolver, IHasVirtualFiles

Properties

Resolver

View Source
Declaration
public IResolver Resolver { get; set; }

OriginalRequest

View Source
Declaration
public object OriginalRequest { get; }

Response

View Source
Declaration
public IResponse Response { get; }

OperationName

View Source
Declaration
public string OperationName { get; set; }

RequestAttributes

View Source
Declaration
public RequestAttributes RequestAttributes { get; set; }

RequestPreferences

View Source
Declaration
public IRequestPreferences RequestPreferences { get; }

Dto

View Source
Declaration
public object Dto { get; set; }

ContentType

View Source
Declaration
public string ContentType { get; set; }

HttpResponse

View Source
Declaration
public IHttpResponse HttpResponse { get; }

UserAgent

View Source
Declaration
public string UserAgent { get; set; }

IsLocal

View Source
Declaration
public bool IsLocal { get; set; }

HttpMethod

View Source
Declaration
public string HttpMethod { get; set; }

Verb

View Source
Declaration
public string Verb { get; }

Cookies

View Source
Declaration
public IDictionary<string, Cookie> Cookies { get; set; }

ResponseContentType

View Source
Declaration
public string ResponseContentType { get; set; }

HasExplicitResponseContentType

View Source
Declaration
public bool HasExplicitResponseContentType { get; }

Headers

View Source
Declaration
public NameValueCollection Headers { get; set; }

QueryString

View Source
Declaration
public NameValueCollection QueryString { get; set; }

FormData

View Source
Declaration
public NameValueCollection FormData { get; set; }

UseBufferedStream

View Source
Declaration
public bool UseBufferedStream { get; set; }

Items

View Source
Declaration
public Dictionary<string, object> Items { get; set; }

RawUrl

View Source
Declaration
public string RawUrl { get; set; }

AbsoluteUri

View Source
Declaration
public string AbsoluteUri { get; }

UserHostAddress

View Source
Declaration
public string UserHostAddress { get; set; }

XForwardedFor

View Source
Declaration
public string XForwardedFor { get; set; }

XForwardedPort

View Source
Declaration
public int? XForwardedPort { get; set; }

XForwardedProtocol

View Source
Declaration
public string XForwardedProtocol { get; set; }

XRealIp

View Source
Declaration
public string XRealIp { get; set; }

Accept

View Source
Declaration
public string Accept { get; set; }

RemoteIp

View Source
Declaration
public string RemoteIp { get; }

Authorization

View Source
Declaration
public string Authorization { get; set; }

IsSecureConnection

View Source
Declaration
public bool IsSecureConnection { get; set; }

AcceptTypes

View Source
Declaration
public string[] AcceptTypes { get; set; }

PathInfo

View Source
Declaration
public string PathInfo { get; set; }

OriginalPathInfo

View Source
Declaration
public string OriginalPathInfo { get; }

InputStream

View Source
Declaration
public Stream InputStream { get; set; }

ContentLength

View Source
Declaration
public long ContentLength { get; }

Files

View Source
Declaration
public IHttpFile[] Files { get; set; }

ApplicationFilePath

View Source
Declaration
public string ApplicationFilePath { get; set; }

UrlReferrer

View Source
Declaration
public Uri UrlReferrer { get; }

IsDirectory

View Source
Declaration
public bool IsDirectory { get; }

IsFile

View Source
Declaration
public bool IsFile { get; }

Methods

TryResolve<T>()

View Source
Declaration
public T TryResolve<T>()
Returns

<T>

Type Parameters
  • T

GetService(Type)

View Source
Declaration
public object GetService(Type serviceType)
Returns

System.Object

Parameters
TypeName
System.TypeserviceType

RemoveSession()

View Source
Declaration
public AuthUserSession RemoveSession()
Returns

ServiceStack.AuthUserSession

ReloadSession()

View Source
Declaration
public AuthUserSession ReloadSession()
Returns

ServiceStack.AuthUserSession

GetRawBody()

View Source
Declaration
public string GetRawBody()
Returns

System.String

GetRawBodyAsync()

View Source
Declaration
public Task<string> GetRawBodyAsync()
Returns

System.Threading.Tasks.Task<System.String>

AddSessionCookies()

View Source
Declaration
public void AddSessionCookies()

GetFile()

View Source
Declaration
public IVirtualFile GetFile()
Returns

ServiceStack.IO.IVirtualFile

GetDirectory()

View Source
Declaration
public IVirtualDirectory GetDirectory()
Returns

ServiceStack.IO.IVirtualDirectory

Implements