Class DefaultLayoutClient
Version: 21.x
Supports making requests to the Sitecore layout service.
Inheritance
System.Object
DefaultLayoutClient
Implements
Namespace: Sitecore.LayoutService.Client
Assembly: Sitecore.LayoutService.Client.dll
Syntax
Constructors
DefaultLayoutClient(IServiceProvider, IOptions, IOptionsSnapshot, ILogger)
Initializes a new instance of the DefaultLayoutClient class.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| System.IServiceProvider | services | The services used for handler resolution. |
| Microsoft.Extensions.Options.IOptions < SitecoreLayoutClientOptions > | layoutClientOptions | The SitecoreLayoutClientOptions for this instance. |
| Microsoft.Extensions.Options.IOptionsSnapshot < SitecoreLayoutRequestOptions > | layoutRequestOptions | An Microsoft.Extensions.Options.IOptionsSnapshot<> to access specific options for the default client request. |
| Microsoft.Extensions.Logging.ILogger < DefaultLayoutClient > | logger | The Microsoft.Extensions.Logging.ILogger to use for logging. |
Methods
Request(SitecoreLayoutRequest)
Invokes a request to the Sitecore layout service using the default handler name.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| SitecoreLayoutRequest | request | The request details. |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task < SitecoreLayoutResponse > | The response of the request. |
Request(SitecoreLayoutRequest, String)
Handles a request to the Sitecore layout service using the specified handler.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| SitecoreLayoutRequest | request | The request details. |
| System.String | handlerName | The name of the request handler to use to handle the request. |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task < SitecoreLayoutResponse > | The response of the request. |
Implements
If you have suggestions for improving this article, let us know!