Delen via


ImageModeration.MatchUrlInputWithHttpMessagesAsync Method

Definition

Fuzzily match an image against one of your custom Image Lists. You can create and manage your custom image lists using <a href="/docs/services/578ff44d2703741568569ab9/operations/578ff7b12703741568569abe">this</a> API.

Returns ID and tags of matching image.<br/> <br/> Note: Refresh Index must be run on the corresponding Image List before additions and removals are reflected in the response.

public System.Threading.Tasks.Task<Microsoft.Rest.HttpOperationResponse<Microsoft.Azure.CognitiveServices.ContentModerator.Models.MatchResponse>> MatchUrlInputWithHttpMessagesAsync (string contentType, Microsoft.Azure.CognitiveServices.ContentModerator.Models.BodyModel imageUrl, string listId = default, bool? cacheImage = default, System.Collections.Generic.Dictionary<string,System.Collections.Generic.List<string>> customHeaders = default, System.Threading.CancellationToken cancellationToken = default);
abstract member MatchUrlInputWithHttpMessagesAsync : string * Microsoft.Azure.CognitiveServices.ContentModerator.Models.BodyModel * string * Nullable<bool> * System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Rest.HttpOperationResponse<Microsoft.Azure.CognitiveServices.ContentModerator.Models.MatchResponse>>
override this.MatchUrlInputWithHttpMessagesAsync : string * Microsoft.Azure.CognitiveServices.ContentModerator.Models.BodyModel * string * Nullable<bool> * System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Rest.HttpOperationResponse<Microsoft.Azure.CognitiveServices.ContentModerator.Models.MatchResponse>>
Public Function MatchUrlInputWithHttpMessagesAsync (contentType As String, imageUrl As BodyModel, Optional listId As String = Nothing, Optional cacheImage As Nullable(Of Boolean) = Nothing, Optional customHeaders As Dictionary(Of String, List(Of String)) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of HttpOperationResponse(Of MatchResponse))

Parameters

contentType
String

The content type.

imageUrl
BodyModel

The image url.

listId
String

The list Id.

cacheImage
Nullable<Boolean>

Whether to retain the submitted image for future use; defaults to false if omitted.

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

Applies to