Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@azure/core-client

Package Overview
Dependencies
Maintainers
2
Versions
281
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@azure/core-client

Core library for interfacing with AutoRest generated code

  • 1.9.3-alpha.20241111.2
  • npm
  • Socket score

Version published
Weekly downloads
2.7M
decreased by-17.05%
Maintainers
2
Weekly downloads
 
Created

What is @azure/core-client?

The @azure/core-client package is designed to be a foundational library for all Azure SDK client libraries. It provides the core functionalities such as HTTP pipeline, serialization, and deserialization of responses, handling of authentication protocols, and error handling. It is intended to streamline the development of Azure SDKs by providing common functionalities needed for interacting with Azure services.

What are @azure/core-client's main functionalities?

HTTP Pipeline

This feature allows developers to customize the HTTP pipeline used for sending requests to Azure services. It includes adding custom policies, using a default HTTP client, and configuring the pipeline with various options.

const { PipelinePolicy, createDefaultHttpClient, createPipelineFromOptions } = require('@azure/core-client');

const httpClient = createDefaultHttpClient();
const pipeline = createPipelineFromOptions({});
pipeline.addPolicy(somePolicy);
const client = new SomeServiceClient(url, credential, { httpClient, pipeline });

Authentication

This feature demonstrates how to use the @azure/identity package with @azure/core-client to authenticate requests to Azure services. It simplifies the process of using Azure Active Directory tokens for authentication.

const { TokenCredential, DefaultAzureCredential } = require('@azure/identity');
const { SomeServiceClient } = require('@azure/some-service');

const credential = new DefaultAzureCredential();
const client = new SomeServiceClient('<your-service-endpoint>', credential);

Serialization and Deserialization

This feature is about serializing request payloads before sending them to Azure services and deserializing responses. It ensures that data is correctly formatted for network transmission and subsequent processing.

const { serialize, deserialize } = require('@azure/core-client');

const model = { name: 'Azure SDK' };
const serializedModel = serialize(model);
const deserializedModel = deserialize(serializedModel);

Other packages similar to @azure/core-client

Keywords

FAQs

Package last updated on 11 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc