Delen via


ServiceClient class

ServiceClient verzendt serviceaanvragen en ontvangt antwoorden.

Constructors

ServiceClient(TokenCredential | ServiceClientCredentials, ServiceClientOptions)

De ServiceClient-constructor

Methoden

sendOperationRequest(OperationArguments, OperationSpec, ServiceCallback<any>)

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

sendRequest(WebResourceLike | RequestPrepareOptions)

Verzend de opgegeven httpRequest.

Constructordetails

ServiceClient(TokenCredential | ServiceClientCredentials, ServiceClientOptions)

De ServiceClient-constructor

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

Parameters

credentials

TokenCredential | ServiceClientCredentials

De referenties die worden gebruikt voor verificatie met de service.

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(WebResourceLike | RequestPrepareOptions)

Verzend de opgegeven httpRequest.

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

Parameters

Retouren