Delen via


ServiceClient class

Constructors

ServiceClient(ServiceClientCredentials | TokenCredential, ServiceClientOptions)

De ServiceClient-constructor

Methoden

sendOperationRequest(OperationArguments, OperationSpec, ServiceCallback<any>)

Verzend een HTTP-aanvraag die is ingevuld met behulp van de opgegeven OperationSpec.

sendRequest(RequestPrepareOptions | WebResourceLike)

Verzend de opgegeven httpRequest.

Constructordetails

ServiceClient(ServiceClientCredentials | TokenCredential, ServiceClientOptions)

De ServiceClient-constructor

new ServiceClient(credentials?: ServiceClientCredentials | TokenCredential, options?: ServiceClientOptions)

Parameters

credentials

ServiceClientCredentials | TokenCredential

Het referentieobject dat wordt gebruikt voor verificatie.

options
ServiceClientOptions

De serviceclientopties die het gedrag van de client bepalen.

Methodedetails

sendOperationRequest(OperationArguments, OperationSpec, ServiceCallback<any>)

Verzend een HTTP-aanvraag die is ingevuld met behulp van de opgegeven OperationSpec.

function sendOperationRequest(operationArguments: OperationArguments, operationSpec: OperationSpec, callback?: ServiceCallback<any>): Promise<RestResponse>

Parameters

operationArguments
OperationArguments

De argumenten waaruit de sjabloonwaarden van de HTTP-aanvraag worden ingevuld.

operationSpec
OperationSpec

De OperationSpec die moet worden gebruikt om de httpRequest in te vullen.

callback

ServiceCallback<any>

De callback om aan te roepen wanneer het antwoord wordt ontvangen.

Retouren

Promise<RestResponse>

sendRequest(RequestPrepareOptions | WebResourceLike)

Verzend de opgegeven httpRequest.

function sendRequest(options: RequestPrepareOptions | WebResourceLike): Promise<HttpOperationResponse>

Parameters

Retouren