Search Results for

    Show / Hide Table of Contents
    View Source

    Interface IPublishedRequest

    The result of Umbraco routing built with the IPublishedRequestBuilder

    Namespace: Umbraco.Cms.Core.Routing
    Assembly: Umbraco.Core.dll
    Syntax
    public interface IPublishedRequest

    Properties

    View Source

    AbsolutePathDecoded

    Gets the URI decoded absolute path of the Uri

    Declaration
    string AbsolutePathDecoded { get; }
    Property Value
    Type Description
    System.String
    View Source

    CacheExtensions

    Gets a list of Extensions to append to the Response.Cache object.

    Declaration
    IReadOnlyList<string>? CacheExtensions { get; }
    Property Value
    Type Description
    System.Nullable<IReadOnlyList<System.String>>
    View Source

    Culture

    Gets the content request's culture.

    Declaration
    string Culture { get; }
    Property Value
    Type Description
    System.String
    Remarks

    This will get mapped to a CultureInfo eventually but CultureInfo are expensive to create so we want to leave that up to the localization middleware to do. See https://github.com/dotnet/aspnetcore/blob/b795ac3546eb3e2f47a01a64feb3020794ca33bb/src/Middleware/Localization/src/RequestLocalizationMiddleware.cs#L165.

    View Source

    Domain

    Gets the content request's domain.

    Declaration
    DomainAndUri Domain { get; }
    Property Value
    Type Description
    DomainAndUri
    Remarks

    Is a DomainAndUri object ie a standard Domain plus the fully qualified uri. For example, the Domain may contain "example.com" whereas the Uri will be fully qualified eg "http://example.com/";.

    View Source

    Headers

    Gets a dictionary of Headers to append to the Response object.

    Declaration
    IReadOnlyDictionary<string, string>? Headers { get; }
    Property Value
    Type Description
    System.Nullable<IReadOnlyDictionary<System.String, System.String>>
    View Source

    IgnorePublishedContentCollisions

    Gets a value indicating whether the Umbraco Backoffice should ignore a collision for this request.

    Declaration
    bool IgnorePublishedContentCollisions { get; }
    Property Value
    Type Description
    System.Boolean
    Remarks

    This is an uncommon API used for edge cases with complex routing and would be used by developers to configure the request to disable collision checks in .

    This flag is based on previous Umbraco versions but it is not clear how this flag can be set by developers since collission checking only occurs in the back office which is launched by for which events do not execute.

    More can be read about this setting here: https://github.com/umbraco/Umbraco-CMS/pull/2148, https://issues.umbraco.org/issue/U4-10345 but it's still unclear how this was used.

    View Source

    IsInternalRedirect

    Gets a value indicating whether the current published content has been obtained from the initial published content following internal redirections exclusively.

    Declaration
    bool IsInternalRedirect { get; }
    Property Value
    Type Description
    System.Boolean
    Remarks

    Used by PublishedContentRequestEngine.FindTemplate() to figure out whether to apply the internal redirect or not, when content is not the initial content.

    View Source

    PublishedContent

    Gets a value indicating the requested content.

    Declaration
    IPublishedContent PublishedContent { get; }
    Property Value
    Type Description
    IPublishedContent
    View Source

    RedirectUrl

    Gets the url to redirect to, when the content request triggers a redirect.

    Declaration
    string RedirectUrl { get; }
    Property Value
    Type Description
    System.String
    View Source

    ResponseStatusCode

    Gets the content request http response status code.

    Declaration
    int? ResponseStatusCode { get; }
    Property Value
    Type Description
    System.Nullable<System.Int32>
    Remarks

    Does not actually set the http response status code, only registers that the response should use the specified code. The code will or will not be used, in due time.

    View Source

    SetNoCacheHeader

    Gets a value indicating whether the no-cache value should be added to the Cache-Control header

    Declaration
    bool SetNoCacheHeader { get; }
    Property Value
    Type Description
    System.Boolean
    View Source

    Template

    Gets the template assigned to the request (if any)

    Declaration
    ITemplate Template { get; }
    Property Value
    Type Description
    ITemplate
    View Source

    Uri

    Gets the cleaned up inbound Uri used for routing.

    Declaration
    Uri Uri { get; }
    Property Value
    Type Description
    Uri
    Remarks

    The cleaned up Uri has no virtual directory, no trailing slash, no .aspx extension, etc.

    • Improve this Doc
    • View Source
    In This Article
    • Properties
      • AbsolutePathDecoded
      • CacheExtensions
      • Culture
      • Domain
      • Headers
      • IgnorePublishedContentCollisions
      • IsInternalRedirect
      • PublishedContent
      • RedirectUrl
      • ResponseStatusCode
      • SetNoCacheHeader
      • Template
      • Uri
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX