@azure/core-http-compat package

Classes

ExtendedServiceClient

Client to provide compatability between core V1 & V2.

Interfaces

CompatResponse

Http Response that is compatible with the core-v1(core-http).

ExtendedClientOptions

Options specific to Shim Clients.

HttpHeader

An individual header within a HttpHeaders collection.

HttpHeadersLike

A collection of HTTP header key/value pairs.

KeepAliveOptions

Keep Alive Options for how HTTP connections.

RedirectOptions

Options for how redirect responses are handled.

RequestPolicy

A compatible interface for core-http request policies

RequestPolicyFactory

An interface for compatibility with core-http's RequestPolicyFactory

RequestPolicyOptionsLike

An interface for compatibility with RequestPolicy

WebResourceLike

A description of a HTTP request to be made to a remote server.

Type Aliases

ExtendedCommonClientOptions

The common set of options that custom shim clients are expected to expose.

ExtendedServiceClientOptions

Options that shim clients are expected to expose.

RawHttpHeaders

A HttpHeaders collection represented as a simple JSON object.

TransferProgressEvent

Fired in response to upload or download progress.

Enums

HttpPipelineLogLevel

An enum for compatibility with RequestPolicy

Functions

convertHttpClient(RequestPolicy)

Converts a RequestPolicy based HttpClient to a PipelineRequest based HttpClient.

createRequestPolicyFactoryPolicy(RequestPolicyFactory[])

A policy that wraps policies written for core-http.

toHttpHeadersLike(HttpHeaders)

Converts HttpHeaders from core-rest-pipeline to look like HttpHeaders from core-http.

Function Details

convertHttpClient(RequestPolicy)

Converts a RequestPolicy based HttpClient to a PipelineRequest based HttpClient.

function convertHttpClient(requestPolicyClient: RequestPolicy): HttpClient

Parameters

requestPolicyClient
RequestPolicy

A HttpClient compatible with core-http

Returns

A HttpClient compatible with core-rest-pipeline

createRequestPolicyFactoryPolicy(RequestPolicyFactory[])

A policy that wraps policies written for core-http.

function createRequestPolicyFactoryPolicy(factories: RequestPolicyFactory[]): PipelinePolicy

Parameters

factories

RequestPolicyFactory[]

An array of RequestPolicyFactory objects from a core-http pipeline

Returns

toHttpHeadersLike(HttpHeaders)

Converts HttpHeaders from core-rest-pipeline to look like HttpHeaders from core-http.

function toHttpHeadersLike(headers: HttpHeaders): HttpHeadersLike

Parameters

headers
HttpHeaders

HttpHeaders from core-rest-pipeline

Returns

HttpHeaders as they looked in core-http