Share via


FormRecognizerClient.AnalyzeWithCustomModelWithHttpMessagesAsync Method

Definition

Analyze Form

public System.Threading.Tasks.Task<Microsoft.Rest.HttpOperationResponse<Microsoft.Azure.CognitiveServices.FormRecognizer.Models.AnalyzeResult>> AnalyzeWithCustomModelWithHttpMessagesAsync (Guid id, System.IO.Stream formStream, System.Collections.Generic.IList<string> keys = default, System.Collections.Generic.Dictionary<string,System.Collections.Generic.List<string>> customHeaders = default, System.Threading.CancellationToken cancellationToken = default);
abstract member AnalyzeWithCustomModelWithHttpMessagesAsync : Guid * System.IO.Stream * System.Collections.Generic.IList<string> * System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Rest.HttpOperationResponse<Microsoft.Azure.CognitiveServices.FormRecognizer.Models.AnalyzeResult>>
override this.AnalyzeWithCustomModelWithHttpMessagesAsync : Guid * System.IO.Stream * System.Collections.Generic.IList<string> * System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Rest.HttpOperationResponse<Microsoft.Azure.CognitiveServices.FormRecognizer.Models.AnalyzeResult>>
Public Function AnalyzeWithCustomModelWithHttpMessagesAsync (id As Guid, formStream As Stream, Optional keys As IList(Of String) = Nothing, Optional customHeaders As Dictionary(Of String, List(Of String)) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of HttpOperationResponse(Of AnalyzeResult))

Parameters

id
Guid

Model Identifier to analyze the document with.

formStream
Stream

A pdf document or image (jpg,png) file to analyze.

keys
IList<String>

An optional list of known keys to extract the values for.

customHeaders
Dictionary<String,List<String>>

Headers that will be added to request.

cancellationToken
CancellationToken

The cancellation token.

Returns

Implements

Exceptions

Thrown when the operation returned an invalid status code

Thrown when unable to deserialize the response

Thrown when a required parameter is null

Thrown when a required parameter is null

Remarks

The document to analyze must be of a supported content type - 'application/pdf', 'image/jpeg' or 'image/png'. The response contains not just the extracted information of the analyzed form but also information about content that was not extracted along with a reason.

Applies to