ContentControllerGetContentAsync - метод
Get content by link.
Пространство имён: Tessa.Web.ControllersСборка: Tessa.Web (в Tessa.Web.dll) Версия: 4.0.4
[HttpGetAttribute("{type}/{contentID}")]
[ProducesAttribute("application/octet-stream", new string[] { ... })]
[ProducesResponseTypeAttribute(200)]
public Task<IActionResult> GetContentAsync(
string type,
string contentID,
[FromQueryAttribute] string? token = null,
CancellationToken cancellationToken = default
)
<HttpGetAttribute("{type}/{contentID}")>
<ProducesAttribute("application/octet-stream", New String() { ... })>
<ProducesResponseTypeAttribute(200)>
Public Function GetContentAsync (
type As String,
contentID As String,
<FromQueryAttribute> Optional token As String = Nothing,
Optional cancellationToken As CancellationToken = Nothing
) As Task(Of IActionResult)
public:
[HttpGetAttribute(L"{type}/{contentID}")]
[ProducesAttribute(L"application/octet-stream", __gc new array<String^>^ { ... })]
[ProducesResponseTypeAttribute(200)]
Task<IActionResult^>^ GetContentAsync(
String^ type,
String^ contentID,
[FromQueryAttribute] String^ token = nullptr,
CancellationToken cancellationToken = CancellationToken()
)
[<HttpGetAttribute("{type}/{contentID}")>]
[<ProducesAttribute("application/octet-stream", new string[] { ... })>]
[<ProducesResponseTypeAttribute(200)>]
member GetContentAsync :
type : string *
contentID : string *
[<FromQueryAttribute>] ?token : string *
?cancellationToken : CancellationToken
(* Defaults:
let _token = defaultArg token null
let _cancellationToken = defaultArg cancellationToken new CancellationToken()
*)
-> Task<IActionResult>
- type String
- Type of requested content.
- contentID String
- Identifier of requested content.
- token String (Optional)
- Token for accessing content. Can be specified either in the query string or in the header Authorization.
- cancellationToken CancellationToken (Optional)
- Token to cancel async task.
TaskIActionResultRequested content
FileStreamResult, or status
NotFound if the link is not valid,
or status
BadRequest if token is specified in both header and query string.