Share via


CodeTransparencyClient.GetEntryReceiptAsync Method

Definition

Overloads

GetEntryReceiptAsync(String, RequestContext)

[Protocol Method] Get the receipt of an entry given a specific entry id.

GetEntryReceiptAsync(String, CancellationToken)

Get the receipt of an entry given a specific entry id.

GetEntryReceiptAsync(String, RequestContext)

Source:
CodeTransparencyClient.cs

[Protocol Method] Get the receipt of an entry given a specific entry id.

public virtual System.Threading.Tasks.Task<Azure.Response> GetEntryReceiptAsync (string entryId, Azure.RequestContext context);
abstract member GetEntryReceiptAsync : string * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
override this.GetEntryReceiptAsync : string * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
Public Overridable Function GetEntryReceiptAsync (entryId As String, context As RequestContext) As Task(Of Response)

Parameters

entryId
String

ID of the entry to retrieve.

context
RequestContext

The request context, which can override default behaviors of the client pipeline on a per-call basis.

Returns

The response returned from the service.

Exceptions

entryId is null.

entryId is an empty string, and was expected to be non-empty.

Service returned a non-success status code.

Examples

This sample shows how to call GetEntryReceiptAsync and parse the result.

Uri endpoint = new Uri("<https://my-service.azure.com>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential);

Response response = await client.GetEntryReceiptAsync("<entryId>", null);

JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.ToString());

This sample shows how to call GetEntryReceiptAsync with all parameters and parse the result.

Uri endpoint = new Uri("<https://my-service.azure.com>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential);

Response response = await client.GetEntryReceiptAsync("<entryId>", null);

JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.ToString());

Applies to

GetEntryReceiptAsync(String, CancellationToken)

Source:
CodeTransparencyClient.cs

Get the receipt of an entry given a specific entry id.

public virtual System.Threading.Tasks.Task<Azure.Response<BinaryData>> GetEntryReceiptAsync (string entryId, System.Threading.CancellationToken cancellationToken = default);
abstract member GetEntryReceiptAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<BinaryData>>
override this.GetEntryReceiptAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<BinaryData>>
Public Overridable Function GetEntryReceiptAsync (entryId As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of BinaryData))

Parameters

entryId
String

ID of the entry to retrieve.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

entryId is null.

entryId is an empty string, and was expected to be non-empty.

Examples

This sample shows how to call GetEntryReceiptAsync.

Uri endpoint = new Uri("<https://my-service.azure.com>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential);

Response<BinaryData> response = await client.GetEntryReceiptAsync("<entryId>");

This sample shows how to call GetEntryReceiptAsync with all parameters.

Uri endpoint = new Uri("<https://my-service.azure.com>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
CodeTransparencyClient client = new CodeTransparencyClient(endpoint, credential);

Response<BinaryData> response = await client.GetEntryReceiptAsync("<entryId>");

Applies to