Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@azure/core-client

Package Overview
Dependencies
Maintainers
2
Versions
421
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

Source
npmnpm
Version
1.10.1-alpha.20250904.2
Version published
Weekly downloads
6.6M
-2.36%
Maintainers
2
Weekly downloads
 
Created
Source

Azure Core Service client library for JavaScript

This library is primarily intended to be used in code generated by AutoRest and autorest.typescript.

Getting started

Currently supported environments

  • LTS versions of Node.js
  • Latest versions of Safari, Chrome, Edge, and Firefox.

See our support policy for more details.

Installation

This package is primarily used in generated code and not meant to be consumed directly by end users.

Key concepts

ServiceClient

This is the common base class for generated clients. It provides the methods sendOperationRequest and sendRequest.

sendRequest simply makes an HTTP request using a Pipeline (see @azure/core-rest-pipeline for details.)

sendOperationRequest is used by generated code to make a request using an OperationSpec and OperationArguments. An OperationSpec is a translation of request requirements from the OpenAPI/Swagger file that describes the service.

createClientPipeline

This method is used to create a Pipeline instance that is customized with extra policies that perform serialization and deserialization. The bulk of the work is in converting requests into the right HTTP message that a service expects and then converting the HTTP response payload into the response shape described by the service's OpenAPI specification file.

Mappers / createSerializer

Mappers are used to encode and decode data into HTTP headers and bodies. They describe all request and response fields. They are referenced by OperationSpecs.

The method createSerializer creates a Serializer that is used to do the bulk of the work transforming data when making a request or processing a response. Given a corpus of Mappers and the appropriate OperationSpec it can manufacture an HTTP request object from a user provided input or convert an HTTP response object into a user-friendly form.

Next steps

You can build and run the tests locally by executing npm run test. Explore the test folder to see advanced usage and behavior of the public classes.

Learn more about AutoRest and the autorest.typescript extension for generating a compatible client on top of this package.

Troubleshooting

If you run into issues while using this library, please feel free to file an issue.

Contributing

If you'd like to contribute to this library, please read the contributing guide to learn more about how to build and test the code.

Keywords

azure

FAQs

Package last updated on 04 Sep 2025

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