Share via


ODataMessageWriterSettings.PayloadBaseUri Property

 

Gets or sets the document base URI which is used as base for all relative URIs.

Namespace:   Microsoft.OData.Core
Assembly:  Microsoft.OData.Core (in Microsoft.OData.Core.dll)

Syntax

public Uri PayloadBaseUri { get; set; }
public:
property Uri^ PayloadBaseUri {
    Uri^ get();
    void set(Uri^ value);
}
member PayloadBaseUri : Uri with get, set
Public Property PayloadBaseUri As Uri

Property Value

Type: System.Uri

The document base URI which is used as base for all relative URIs.

Remarks

Note that for typical OData services this should end with a slash character. For example "http://services.odata.org/OData/OData.svc/" will work as expected, that is a relative URI "Products(0)" will correctly combine with the base to produce "http://services.odata.org/OData/OData.svc/Products(0)". If the URI would not end with a slash, the last segment is not considered when base and relative URIs are combined. So for example this base URI "http://services.odata.org/OData/OData.svc" combined with relative URI "Products(0)" would produce "http://services.odata.org/OData/Products(0)", which is typically not the desired result.

See Also

ODataMessageWriterSettings Class
Microsoft.OData.Core Namespace

Return to top