Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface RequestPrepareOptions

Package version

Hierarchy

  • RequestPrepareOptions

Index

Properties

Optional abortSignal

abortSignal: AbortSignalLike

Optional baseUrl

baseUrl: undefined | string

The base url of the request. Default value is: "https://management.azure.com". This is applicable only with pathTemplate. If you are providing options.url then it is expected that you provide the complete url.

Optional body

body: any

The request body. It can be of any type. This value will be serialized if it is not a stream.

Optional bodyIsStream

bodyIsStream: undefined | false | true

Indicates whether the request body is a stream (useful for file upload scenarios).

Optional deserializationMapper

deserializationMapper: undefined | object

Provides information on how to deserialize the response body.

Optional disableClientRequestId

disableClientRequestId: undefined | false | true

When set to true, instructs the client to not set "x-ms-client-request-id" header to a new Guid().

Optional disableJsonStringifyOnBody

disableJsonStringifyOnBody: undefined | false | true

Indicates whether this method should JSON.stringify() the request body. Default value: false.

Optional formData

formData: undefined | object

Optional headers

headers: undefined | object

A dictionary of request headers that need to be applied to the request. Here the key is the "header-name" and the value is the "header-value". The header-value MUST be of type string.

  • ContentType must be provided with the key name as "Content-Type". Default value "application/json; charset=utf-8".
  • "Transfer-Encoding" is set to "chunked" by default if "options.bodyIsStream" is set to true.
  • "Content-Type" is set to "application/octet-stream" by default if "options.bodyIsStream" is set to true.
  • "accept-language" by default is set to "en-US"
  • "x-ms-client-request-id" by default is set to a new Guid. To not generate a guid for the request, please set options.disableClientRequestId to true

Optional mappers

mappers: undefined | object

A dictionary of mappers that may be used while [de]serialization.

method

method: HttpMethods

The HTTP request method. Valid values are "GET", "PUT", "HEAD", "DELETE", "OPTIONS", "POST", or "PATCH".

Optional onDownloadProgress

onDownloadProgress: undefined | function

Optional onUploadProgress

onUploadProgress: undefined | function

Optional pathParameters

pathParameters: undefined | object

A dictionary of path parameters that need to be replaced with actual values in the pathTemplate. Here the key is the "path-parameter-name" and the value is the "path-parameter-value". The "path-parameter-value" can be of type "string" or it can be of type "object". The "object" format should be used when you want to skip url encoding. While using the object format, the object must have a property named value which provides the "path-parameter-value". Example:

  • path-parameter-value in "object" format: { "path-parameter-name": { value: "path-parameter-value", skipUrlEncoding: true } }
  • path-parameter-value in "string" format: { "path-parameter-name": "path-parameter-value" }.

Optional pathTemplate

pathTemplate: undefined | string

The path template of the request url. Either provide the "url" or provide the "pathTemplate" in the options object. Both the options are mutually exclusive. Example: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}"

Optional queryParameters

queryParameters: undefined | object

A dictionary of query parameters to be appended to the url, where the "key" is the "query-parameter-name" and the "value" is the "query-parameter-value". The "query-parameter-value" can be of type "string" or it can be of type "object". The "object" format should be used when you want to skip url encoding. While using the object format, the object must have a property named value which provides the "query-parameter-value". Example:

  • query-parameter-value in "object" format: { "query-parameter-name": { value: "query-parameter-value", skipUrlEncoding: true } }
  • query-parameter-value in "string" format: { "query-parameter-name": "query-parameter-value"}. Note: "If options.url already has some query parameters, then the value provided in options.queryParameters will be appended to the url.

Optional serializationMapper

serializationMapper: Mapper

Provides information on how to serialize the request body.

Optional spanOptions

spanOptions: SpanOptions

Optional url

url: undefined | string

The request url. It may or may not have query parameters in it. Either provide the "url" or provide the "pathTemplate" in the options object. Both the options are mutually exclusive.

Generated using TypeDoc